import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import javax.swing.border.LineBorder;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import org.rsbot.script.util.WindowUtil;

class FOGRunner$FOGRunnerGUI extends JFrame
  implements ListSelectionListener, ActionListener
{
  int screenHeight = (int)Toolkit.getDefaultToolkit().getScreenSize().getHeight();

  private JPanel jContentPane = null;
  private JPanel MainTab = null;
  private JPanel OptionsTab = null;
  private JPanel PrayersTab = null;
  private JPanel CombatStylesTab = null;
  private JPanel CombatStylesTabDefence = null;
  private JPanel CombatStylesTabScrollable = null;
  private JPanel CombatStylesTabScrollableDefence = null;
  private JPanel MoneyTab = null;
  private JTabbedPane jTabbedPane = null;
  private JButton Start = null;
  private JButton Cancel = null;
  private JButton Save = null;
  private JButton Load = null;
  private final JLabel statusLabel = new JLabel();

  private final JLabel imageLabel = new JLabel();
  private final JLabel notesLabel = new JLabel();
  private final JLabel note1 = new JLabel();
  private final JLabel note2 = new JLabel();
  private final JLabel note3 = new JLabel();
  private final JLabel continueNote = new JLabel();
  private final JLabel authorNote = new JLabel();
  private final JLabel versionNote = new JLabel();
  private JCheckBox chckbxAntiBan;
  private JCheckBox chckbxBandages;
  private JCheckBox chckbxDmode;
  private JCheckBox chckbxSearch;
  private JCheckBox chckbxScreenshots;
  private JCheckBox chckbxBankTokens;
  private final JLabel teleOrbLabel = new JLabel();
  private final JComboBox teleOrbBox = new JComboBox();
  private final JTextArea bankTokensNum = new JTextArea();
  private final JLabel mouseSpeedLabel = new JLabel();
  private final JLabel mouseSpeedLabel2 = new JLabel();
  private final JTextArea mouseSpeedBox = new JTextArea();
  private final JLabel continueNoteOptions = new JLabel();
  private JCheckBox chckbxPrayers;
  private JCheckBox chckbxAttackPrayers;
  private JCheckBox chckbxSkinPrayers;
  private JCheckBox chckbxQuickPrayers;
  private final JLabel prayersLabel = new JLabel();
  private final JLabel prayersLabel2 = new JLabel();
  private final JLabel prayersAttackLabel = new JLabel();
  private final JLabel prayersAttackLabel2 = new JLabel();
  private final JLabel prayersSkinLabel = new JLabel();
  private final JLabel prayersSkinLabel2 = new JLabel();
  private final JComboBox quickPrayersBox = new JComboBox();
  private final JLabel continueNotePrayers = new JLabel();

  private final JLabel moneyLabel1 = new JLabel();
  private JPanel itemsList = null;
  private JScrollPane itemScrollPane = null;
  public JLabel[] itemPrices = new JLabel[100];
  public JLabel[] itemRatios = new JLabel[100];

  private final Color enabledColor = new Color(210, 210, 210);
  private final Color disabledColor = new Color(230, 230, 230);

  private final JLabel inventoryNoteText1 = new JLabel();
  private final JLabel inventoryNoteText2 = new JLabel();
  private final JLabel inventoryNoteText3 = new JLabel();
  private final JLabel combatStylesText1 = new JLabel();
  private final JLabel combatStylesText2 = new JLabel();
  private final JLabel combatStylesText3 = new JLabel();
  private final JLabel startCombatStyleText = new JLabel();
  private final JComboBox startCombatStyle = new JComboBox();
  private JCheckBox chckbxFSGame;
  private final JLabel switchTriggersTitle = new JLabel();
  private JCheckBox prayerTrigger;
  private JCheckBox meleeSafeSpotTrigger;
  private JCheckBox everyGameTrigger;
  private JCheckBox randomGameTrigger;
  private JCheckBox hitTrigger;
  private final JTextArea hitTriggerBox1 = new JTextArea();
  private final JLabel hitTriggerText1 = new JLabel();
  private final JTextArea hitTriggerBox2 = new JTextArea();
  private final JLabel hitTriggerText2 = new JLabel();
  private DefaultListModel model;
  private JLabel inventoryTitleText;
  private JScrollPane scrollPane;
  private JList invList;
  private JCheckBox chckbxMelee;
  private JPanel meleePanel = null;
  private final Rectangle meleeArea = new Rectangle(285, 87, 430, 117);
  private DefaultListModel meleeModel;
  private JLabel meleeTitleText;
  private JScrollPane meleeScrollPane;
  private JList meleeList;
  private JButton meleeAdd = null;
  private JButton meleeRemove = null;
  private JLabel meleeOptionsTitle;
  private JLabel meleeAttackStyleTitle;
  private final JComboBox meleeAttackStyleBox = new JComboBox();
  private JCheckBox chckbxMagic;
  private JPanel magicPanel = null;
  private final Rectangle magicArea = new Rectangle(285, 207, 430, 117);
  private DefaultListModel magicModel;
  private JLabel magicTitleText;
  private JScrollPane magicScrollPane;
  private JList magicList;
  private JButton magicAdd = null;
  private JButton magicRemove = null;
  private JLabel magicOptionsTitle;
  private JLabel magicCastSpellTitle;
  private final JComboBox magicCastSpell = new JComboBox();
  private JCheckBox chckbxRange;
  private JPanel rangePanel = null;
  private final Rectangle rangeArea = new Rectangle(285, 327, 430, 117);
  private DefaultListModel rangeModel;
  private JLabel rangeTitleText;
  private JScrollPane rangeScrollPane;
  private JList rangeList;
  private JButton rangeAdd = null;
  private JButton rangeRemove = null;
  private JLabel rangeOptionsTitle;
  private JLabel rangeAttackStyleTitle;
  private final JComboBox rangeAttackStyleBox = new JComboBox();

  private final JLabel inventoryNoteText1Defence = new JLabel();
  private final JLabel inventoryNoteText2Defence = new JLabel();
  private final JLabel inventoryNoteText3Defence = new JLabel();
  private final JLabel combatStylesText1Defence = new JLabel();
  private final JLabel combatStylesText2Defence = new JLabel();
  private final JLabel combatStylesText3Defence = new JLabel();
  private final JLabel stylesNoteDefence1 = new JLabel();
  private final JLabel stylesNoteDefence2 = new JLabel();
  private final JLabel stylesNoteDefence3 = new JLabel();
  private DefaultListModel modelDefence;
  private JLabel inventoryTitleTextDefence;
  private JScrollPane scrollPaneDefence;
  private JList invListDefence;
  private JCheckBox chckbxMeleeDefence;
  private JPanel meleePanelDefence = null;
  private final Rectangle meleeAreaDefence = new Rectangle(285, 87, 430, 117);
  private DefaultListModel meleeModelDefence;
  private JLabel meleeTitleTextDefence;
  private JScrollPane meleeScrollPaneDefence;
  private JList meleeListDefence;
  private JButton meleeAddDefence = null;
  private JButton meleeRemoveDefence = null;
  private JCheckBox chckbxMagicDefence;
  private JPanel magicPanelDefence = null;
  private final Rectangle magicAreaDefence = new Rectangle(285, 207, 430, 117);
  private DefaultListModel magicModelDefence;
  private JLabel magicTitleTextDefence;
  private JScrollPane magicScrollPaneDefence;
  private JList magicListDefence;
  private JButton magicAddDefence = null;
  private JButton magicRemoveDefence = null;
  private JCheckBox chckbxRangeDefence;
  private JPanel rangePanelDefence = null;
  private final Rectangle rangeAreaDefence = new Rectangle(285, 327, 430, 117);
  private DefaultListModel rangeModelDefence;
  private JLabel rangeTitleTextDefence;
  private JScrollPane rangeScrollPaneDefence;
  private JList rangeListDefence;
  private JButton rangeAddDefence = null;
  private JButton rangeRemoveDefence = null;

  public FOGRunner$FOGRunnerGUI(FOGRunner paramFOGRunner) {
    initialize();
    setVisible(true);
  }

  private void initialize() {
    for (int i = 0; i < this.this$0.FOGItems.length; i++) {
      this.itemPrices[i] = new JLabel();
      this.itemPrices[i].setFont(new Font("SansSerif", 0, 12));
      this.itemPrices[i].setText("Loading...");
      this.itemRatios[i] = new JLabel();
      this.itemRatios[i].setFont(new Font("SansSerif", 0, 12));
      this.itemRatios[i].setText("Loading...");
    }
    if (this.screenHeight < 750)
      setSize(810, 570);
    else {
      setSize(810, 710);
    }
    setContentPane(getJContentPane());
    setTitle("FOGRunner by TerraBubble");
    WindowUtil.position(this);
  }

  private JPanel getJContentPane() {
    if (this.jContentPane == null) {
      this.jContentPane = new JPanel();
      this.jContentPane.setLayout(null);
      this.jContentPane.add(getJTabbedPane(), null);
      this.jContentPane.add(getStartButton(), null);
      this.jContentPane.add(getCancelButton(), null);
      this.jContentPane.add(getSaveButton(), null);
      this.jContentPane.add(getLoadButton(), null);
      this.jContentPane.add(getStatusLabel(), null);
    }
    return this.jContentPane;
  }

  private JTabbedPane getJTabbedPane() {
    if (this.screenHeight < 750) {
      if (this.jTabbedPane == null) {
        this.jTabbedPane = new JTabbedPane();
        this.jTabbedPane.setBounds(new Rectangle(2, 4, 805, 515));
        this.jTabbedPane.addTab("Main", null, getMainTab(), null);
        this.jTabbedPane.addTab("Options", null, getOptionsTab(), null);
        this.jTabbedPane.addTab("Prayers", null, getPrayersTab(), null);
        this.jTabbedPane.addTab("Attack Styles (Hybridding)", null, getCombatStylesTabScrollable(), null);

        this.jTabbedPane.addTab("Defence Styles", null, getCombatStylesTabScrollableDefence(), null);

        this.jTabbedPane.addTab("Money", null, getMoneyTab(), null);
      }
    }
    else if (this.jTabbedPane == null) {
      this.jTabbedPane = new JTabbedPane();
      this.jTabbedPane.setBounds(new Rectangle(2, 4, 805, 641));
      this.jTabbedPane.addTab("Main", null, getMainTab(), null);
      this.jTabbedPane.addTab("Options", null, getOptionsTab(), null);
      this.jTabbedPane.addTab("Prayers", null, getPrayersTab(), null);
      this.jTabbedPane.addTab("Attack Styles (Hybridding)", null, getCombatStylesTab(), null);

      this.jTabbedPane.addTab("Defence Styles", null, getCombatStylesTabDefence(), null);

      this.jTabbedPane.addTab("Money", null, getMoneyTab(), null);
    }

    return this.jTabbedPane;
  }

  private JPanel getMoneyTab() {
    if (this.MoneyTab == null) {
      this.MoneyTab = new JPanel();
      this.MoneyTab.setLayout(null);
      if (this.screenHeight < 750) {
        this.MoneyTab.setBounds(0, 0, 775, 660);
        this.MoneyTab.setPreferredSize(new Dimension(775, 700));
      }

      this.moneyLabel1.setFont(new Font("SansSerif", 0, 12));
      this.moneyLabel1.setText("This tab shows prices and tokens for every FOG reward so you can maximise profit from FOG tokens.");

      this.moneyLabel1.setBounds(new Rectangle(new Point(30, 25), this.moneyLabel1.getPreferredSize()));

      this.MoneyTab.add(this.moneyLabel1);

      int i = 40;
      int j = 82;

      JLabel localJLabel1 = new JLabel();
      localJLabel1.setFont(new Font("SansSerif", 1, 12));
      localJLabel1.setText("Name");
      localJLabel1.setBounds(new Rectangle(new Point(i + 10, j + 3), localJLabel1.getPreferredSize()));

      this.MoneyTab.add(localJLabel1);
      JPanel localJPanel1 = new JPanel();
      localJPanel1.setLayout(null);
      localJPanel1.setBounds(i, j + 1, 181, 18);
      localJPanel1.setBackground(this.enabledColor);
      localJPanel1.setBorder(new LineBorder(Color.BLACK));
      this.MoneyTab.add(localJPanel1);

      JLabel localJLabel2 = new JLabel();
      localJLabel2.setFont(new Font("SansSerif", 1, 12));
      localJLabel2.setText("FOG Tokens");
      localJLabel2.setBounds(new Rectangle(new Point(i + 190, j + 3), localJLabel2.getPreferredSize()));

      this.MoneyTab.add(localJLabel2);
      JPanel localJPanel2 = new JPanel();
      localJPanel2.setLayout(null);
      localJPanel2.setBounds(i + 180, j + 1, 121, 18);
      localJPanel2.setBackground(this.enabledColor);
      localJPanel2.setBorder(new LineBorder(Color.BLACK));
      this.MoneyTab.add(localJPanel2);

      JLabel localJLabel3 = new JLabel();
      localJLabel3.setFont(new Font("SansSerif", 1, 12));
      localJLabel3.setText("GE Market Price");
      localJLabel3.setBounds(new Rectangle(new Point(i + 310, j + 3), localJLabel3.getPreferredSize()));

      this.MoneyTab.add(localJLabel3);
      JPanel localJPanel3 = new JPanel();
      localJPanel3.setLayout(null);
      localJPanel3.setBounds(i + 300, j + 1, 121, 18);
      localJPanel3.setBackground(this.enabledColor);
      localJPanel3.setBorder(new LineBorder(Color.BLACK));
      this.MoneyTab.add(localJPanel3);

      JLabel localJLabel4 = new JLabel();
      localJLabel4.setFont(new Font("SansSerif", 1, 12));
      localJLabel4.setText("GP Per Token");
      localJLabel4.setBounds(new Rectangle(new Point(i + 430, j + 3), localJLabel4.getPreferredSize()));

      this.MoneyTab.add(localJLabel4);
      JPanel localJPanel4 = new JPanel();
      localJPanel4.setLayout(null);
      localJPanel4.setBounds(i + 420, j + 1, 121, 18);
      localJPanel4.setBackground(this.enabledColor);
      localJPanel4.setBorder(new LineBorder(Color.BLACK));
      this.MoneyTab.add(localJPanel4);

      JLabel localJLabel5 = new JLabel();
      localJLabel5.setFont(new Font("SansSerif", 1, 12));
      localJLabel5.setText("Members?");
      localJLabel5.setBounds(new Rectangle(new Point(i + 550, j + 3), localJLabel5.getPreferredSize()));

      this.MoneyTab.add(localJLabel5);
      JPanel localJPanel5 = new JPanel();
      localJPanel5.setLayout(null);
      localJPanel5.setBounds(i + 540, j + 1, 155, 18);
      localJPanel5.setBackground(this.enabledColor);
      localJPanel5.setBorder(new LineBorder(Color.BLACK));
      this.MoneyTab.add(localJPanel5);

      this.itemScrollPane = new JScrollPane(getItemsList(), 22, 31);

      if (this.screenHeight < 750)
        this.itemScrollPane.setBounds(i, j + 18, 695, 250);
      else {
        this.itemScrollPane.setBounds(i, j + 18, 695, 360);
      }
      this.MoneyTab.add(this.itemScrollPane);
    }

    return this.MoneyTab;
  }

  private JPanel getItemsList() {
    if (this.itemsList == null) {
      this.itemsList = new JPanel();
      this.itemsList.setLayout(null);
      this.itemsList.setBounds(40, 100, 695, 404);
      this.itemsList.setPreferredSize(new Dimension(695, 410));

      for (int i = 0; i < this.this$0.FOGItems.length; i++)
      {
        JLabel localJLabel1 = new JLabel();
        localJLabel1.setFont(new Font("SansSerif", 0, 12));
        localJLabel1.setText(this.this$0.FOGItems[i].name);
        localJLabel1.setBounds(new Rectangle(new Point(3, this.this$0.v[i] + 1), localJLabel1.getPreferredSize()));

        this.itemsList.add(localJLabel1);

        JLabel localJLabel2 = new JLabel();
        localJLabel2.setFont(new Font("SansSerif", 0, 12));
        localJLabel2.setText(new StringBuilder().append("").append(this.this$0.FOGItems[i].tokens).toString());
        localJLabel2.setBounds(new Rectangle(new Point(195, this.this$0.v[i] + 1), localJLabel2.getPreferredSize()));

        this.itemsList.add(localJLabel2);

        this.itemPrices[i].setBounds(new Rectangle(new Point(315, this.this$0.v[i] + 1), this.itemPrices[i].getPreferredSize()));

        this.itemsList.add(this.itemPrices[i]);
        this.itemRatios[i].setBounds(new Rectangle(new Point(435, this.this$0.v[i] + 1), this.itemRatios[i].getPreferredSize()));

        this.itemsList.add(this.itemRatios[i]);

        JLabel localJLabel3 = new JLabel();
        localJLabel3.setFont(new Font("SansSerif", 0, 12));
        if (this.this$0.FOGItems[i].members)
          localJLabel3.setText("Yes");
        else {
          localJLabel3.setText("No");
        }
        localJLabel3.setBounds(new Rectangle(new Point(555, this.this$0.v[i] + 1), localJLabel3.getPreferredSize()));

        this.itemsList.add(localJLabel3);

        JPanel localJPanel = new JPanel();
        localJPanel.setBounds(0, this.this$0.v[i], 695, 17);
        if ((this.this$0.v[i] + 2) % 2 == 0)
          localJPanel.setBackground(this.disabledColor);
        else {
          localJPanel.setBackground(this.enabledColor);
        }
        this.itemsList.add(localJPanel);
      }
    }
    return this.itemsList;
  }

  private JPanel getCombatStylesTabScrollable() {
    if (this.CombatStylesTabScrollable == null) {
      this.CombatStylesTabScrollable = new JPanel();
      this.CombatStylesTabScrollable.setLayout(null);

      JScrollPane localJScrollPane = new JScrollPane(getCombatStylesTab(), 22, 31);

      localJScrollPane.setBounds(0, 0, 775, 465);
      this.CombatStylesTabScrollable.add(localJScrollPane);
    }

    return this.CombatStylesTabScrollable;
  }

  private JPanel getCombatStylesTabScrollableDefence() {
    if (this.CombatStylesTabScrollableDefence == null) {
      this.CombatStylesTabScrollableDefence = new JPanel();
      this.CombatStylesTabScrollableDefence.setLayout(null);

      JScrollPane localJScrollPane = new JScrollPane(getCombatStylesTabDefence(), 22, 31);

      localJScrollPane.setBounds(0, 1, 775, 465);
      this.CombatStylesTabScrollableDefence.add(localJScrollPane);
    }

    return this.CombatStylesTabScrollableDefence;
  }

  private JButton getStartButton() {
    if (this.Start == null) {
      this.Start = new JButton();
      if (this.screenHeight < 750)
        this.Start.setBounds(new Rectangle(10, 513, 100, 25));
      else {
        this.Start.setBounds(new Rectangle(10, 648, 100, 25));
      }
      this.Start.setText("Start");
      this.Start.addActionListener(this);
    }
    return this.Start;
  }

  private JButton getCancelButton() {
    if (this.Cancel == null) {
      this.Cancel = new JButton();
      if (this.screenHeight < 750)
        this.Cancel.setBounds(new Rectangle(110, 513, 100, 25));
      else {
        this.Cancel.setBounds(new Rectangle(110, 648, 100, 25));
      }
      this.Cancel.setText("Cancel");
      this.Cancel.addActionListener(this);
    }
    return this.Cancel;
  }

  private JButton getSaveButton() {
    if (this.Save == null) {
      this.Save = new JButton();
      if (this.screenHeight < 750)
        this.Save.setBounds(new Rectangle(550, 513, 120, 25));
      else {
        this.Save.setBounds(new Rectangle(550, 648, 120, 25));
      }
      this.Save.setText("Save Settings");
      this.Save.addActionListener(this);
    }
    return this.Save;
  }

  private JButton getLoadButton() {
    if (this.Load == null) {
      this.Load = new JButton();
      if (this.screenHeight < 750)
        this.Load.setBounds(new Rectangle(670, 513, 120, 25));
      else {
        this.Load.setBounds(new Rectangle(670, 648, 120, 25));
      }
      this.Load.setText("Load Settings");
      this.Load.addActionListener(this);
    }
    return this.Load;
  }

  private JLabel getStatusLabel() {
    this.statusLabel.setFont(new Font("SansSerif", 0, 12));
    this.statusLabel.setText("");
    setStatusLabelBounds();
    return this.statusLabel;
  }

  private void setStatusLabelBounds() {
    if (this.screenHeight < 750) {
      this.statusLabel.setBounds(new Rectangle(new Point(405 - (int)(this.statusLabel.getPreferredSize().getWidth() / 2.0D), 513), this.statusLabel.getPreferredSize()));
    }
    else
    {
      this.statusLabel.setBounds(new Rectangle(new Point(405 - (int)(this.statusLabel.getPreferredSize().getWidth() / 2.0D), 648), this.statusLabel.getPreferredSize()));
    }
  }

  private JPanel getMainTab()
  {
    if (this.MainTab == null) {
      this.MainTab = new JPanel();
      this.MainTab.setLayout(null);

      if (this.this$0.success)
        this.imageLabel.setIcon(new ImageIcon(this.this$0.banner));
      else {
        this.imageLabel.setText("Image download error");
      }
      this.imageLabel.setBounds(new Rectangle(new Point(2, 0), this.imageLabel.getPreferredSize()));

      this.MainTab.add(this.imageLabel);

      this.notesLabel.setFont(new Font("SansSerif", 0, 23));
      this.notesLabel.setText("Notes:");
      this.notesLabel.setBounds(new Rectangle(new Point(400 - (int)(this.notesLabel.getPreferredSize().getWidth() / 2.0D), 260), this.notesLabel.getPreferredSize()));

      this.MainTab.add(this.notesLabel);

      this.note1.setFont(new Font("SansSerif", 0, 15));
      this.note1.setText("Start in the Fist of Guthix Lobby");
      this.note1.setBounds(new Rectangle(new Point(400 - (int)(this.note1.getPreferredSize().getWidth() / 2.0D), 295), this.note1.getPreferredSize()));

      this.MainTab.add(this.note1);

      this.note2.setFont(new Font("SansSerif", 0, 15));
      this.note2.setText("XP Paint will appear once you start gaining XP");
      this.note2.setBounds(new Rectangle(new Point(400 - (int)(this.note2.getPreferredSize().getWidth() / 2.0D), 320), this.note2.getPreferredSize()));

      this.MainTab.add(this.note2);

      this.note3.setFont(new Font("SansSerif", 0, 15));
      this.note3.setText("Hover over the XP Paint to see details in that skill");
      this.note3.setBounds(new Rectangle(new Point(400 - (int)(this.note3.getPreferredSize().getWidth() / 2.0D), 345), this.note3.getPreferredSize()));

      this.MainTab.add(this.note3);

      this.continueNote.setFont(new Font("SansSerif", 0, 16));
      this.continueNote.setText("Continue to next tab to set up script");

      this.continueNote.setBounds(new Rectangle(new Point(400 - (int)(this.continueNote.getPreferredSize().getWidth() / 2.0D), 500), this.continueNote.getPreferredSize()));

      this.MainTab.add(this.continueNote);

      this.authorNote.setFont(new Font("SansSerif", 0, 12));
      this.authorNote.setText("By TerraBubble");
      this.authorNote.setBounds(new Rectangle(new Point(400 - (int)(this.authorNote.getPreferredSize().getWidth() / 2.0D), 555), this.authorNote.getPreferredSize()));

      this.MainTab.add(this.authorNote);

      this.versionNote.setFont(new Font("SansSerif", 0, 12));
      this.versionNote.setText(new StringBuilder().append("Version ").append(this.this$0.getVersion()).toString());
      this.versionNote.setBounds(new Rectangle(new Point(400 - (int)(this.versionNote.getPreferredSize().getWidth() / 2.0D), 572), this.versionNote.getPreferredSize()));

      this.MainTab.add(this.versionNote);
    }

    return this.MainTab;
  }

  private JPanel getOptionsTab() {
    if (this.OptionsTab == null) {
      this.OptionsTab = new JPanel();
      this.OptionsTab.setLayout(null);

      this.chckbxAntiBan = new JCheckBox("Use AntiBan");
      this.chckbxAntiBan.addActionListener(this);
      this.chckbxAntiBan.setBounds(30, 20, 390, 16);
      this.chckbxAntiBan.setSelected(true);
      this.OptionsTab.add(this.chckbxAntiBan);

      this.chckbxBandages = new JCheckBox("Use Bandages");
      this.chckbxBandages.addActionListener(this);
      this.chckbxBandages.setBounds(30, 45, 370, 16);
      this.chckbxBandages.setSelected(true);
      this.OptionsTab.add(this.chckbxBandages);

      this.teleOrbLabel.setText("Use Tele-Orb: ");
      this.teleOrbLabel.setBounds(new Rectangle(new Point(57, 75), this.teleOrbLabel.getPreferredSize()));

      this.OptionsTab.add(this.teleOrbLabel);

      this.teleOrbBox.setModel(new DefaultComboBoxModel(new String[] { "When being Hunted", "When Hunting", "Random (Hunting/Hunted)", "Never" }));

      this.teleOrbBox.setBounds(new Rectangle(new Point(160, 71), this.teleOrbBox.getPreferredSize()));

      this.teleOrbBox.addActionListener(this);
      this.OptionsTab.add(this.teleOrbBox);

      this.chckbxBankTokens = new JCheckBox("Bank Tokens When You Have Over ");

      this.chckbxBankTokens.addActionListener(this);
      this.chckbxBankTokens.setBounds(30, 110, this.chckbxBankTokens.getPreferredSize().width, 16);

      this.chckbxBankTokens.setSelected(false);
      this.OptionsTab.add(this.chckbxBankTokens);

      this.bankTokensNum.setBounds(290, 109, 45, 20);
      this.bankTokensNum.setBorder(new LineBorder(new Color(0, 0, 0, 255)));

      this.bankTokensNum.setText("9000");
      this.OptionsTab.add(this.bankTokensNum);

      this.chckbxSearch = new JCheckBox("Search for Opponent when Hunting");

      this.chckbxSearch.addActionListener(this);
      this.chckbxSearch.setBounds(30, 137, 370, 16);
      this.chckbxSearch.setSelected(true);
      this.OptionsTab.add(this.chckbxSearch);

      this.chckbxScreenshots = new JCheckBox("Take Screenshots on Level Ups");

      this.chckbxScreenshots.addActionListener(this);
      this.chckbxScreenshots.setBounds(30, 162, 370, 16);
      this.chckbxScreenshots.setSelected(true);
      this.OptionsTab.add(this.chckbxScreenshots);

      this.mouseSpeedLabel.setText("Mouse Speed: ");
      this.mouseSpeedLabel.setBounds(new Rectangle(new Point(57, 187), this.mouseSpeedLabel.getPreferredSize()));

      this.OptionsTab.add(this.mouseSpeedLabel);

      this.mouseSpeedBox.setBounds((int)this.mouseSpeedLabel.getPreferredSize().getWidth() + 67, 184, 30, 20);

      this.mouseSpeedBox.setBorder(new LineBorder(new Color(0, 0, 0, 255)));

      this.mouseSpeedBox.setText("7");
      this.OptionsTab.add(this.mouseSpeedBox);

      this.mouseSpeedLabel2.setText("(The lower the number, the faster the mouse)");

      this.mouseSpeedLabel2.setBounds(new Rectangle(new Point((int)this.mouseSpeedLabel.getPreferredSize().getWidth() + 107, 187), this.mouseSpeedLabel2.getPreferredSize()));

      this.OptionsTab.add(this.mouseSpeedLabel2);

      this.chckbxDmode = new JCheckBox("Debug Mode");
      this.chckbxDmode.addActionListener(this);
      this.chckbxDmode.setBounds(30, 212, 370, 16);
      this.chckbxDmode.setSelected(false);
      this.OptionsTab.add(this.chckbxDmode);

      this.continueNoteOptions.setFont(new Font("SansSerif", 0, 16));
      this.continueNoteOptions.setText("Continue to next tab to set up prayers");

      this.continueNoteOptions.setBounds(new Rectangle(new Point(400 - (int)(this.continueNoteOptions.getPreferredSize().getWidth() / 2.0D), 530), this.continueNoteOptions.getPreferredSize()));

      this.OptionsTab.add(this.continueNoteOptions);
    }

    return this.OptionsTab;
  }

  private JPanel getPrayersTab() {
    if (this.PrayersTab == null) {
      this.PrayersTab = new JPanel();
      this.PrayersTab.setLayout(null);

      this.chckbxQuickPrayers = new JCheckBox("Use Quick Prayers when: ");

      this.chckbxQuickPrayers.addActionListener(this);
      this.chckbxQuickPrayers.setBounds(30, 25, this.chckbxQuickPrayers.getPreferredSize().width, 16);

      this.chckbxQuickPrayers.setSelected(false);
      this.PrayersTab.add(this.chckbxQuickPrayers);

      this.quickPrayersBox.setModel(new DefaultComboBoxModel(new String[] { "When Hunting", "When Being Hunted" }));

      this.quickPrayersBox.setBounds(new Rectangle(new Point(220, 21), this.quickPrayersBox.getPreferredSize()));

      this.quickPrayersBox.addActionListener(this);
      this.PrayersTab.add(this.quickPrayersBox);

      this.chckbxPrayers = new JCheckBox("Use Protection Prayers");
      this.chckbxPrayers.addActionListener(this);
      this.chckbxPrayers.setBounds(30, 60, 370, 16);
      this.chckbxPrayers.setSelected(false);
      this.PrayersTab.add(this.chckbxPrayers);

      this.prayersLabel.setText("This will use 'Protect from ...' prayers automatically depending on the attack style of your");

      this.prayersLabel.setBounds(new Rectangle(new Point(57, 80), this.prayersLabel.getPreferredSize()));

      this.PrayersTab.add(this.prayersLabel);

      this.prayersLabel2.setText("opponent and your Prayer level.");
      this.prayersLabel2.setBounds(new Rectangle(new Point(57, 100), this.prayersLabel2.getPreferredSize()));

      this.PrayersTab.add(this.prayersLabel2);

      this.chckbxAttackPrayers = new JCheckBox("Use Attack Multiplier Prayers");

      this.chckbxAttackPrayers.addActionListener(this);
      this.chckbxAttackPrayers.setBounds(30, 139, 370, 16);
      this.chckbxAttackPrayers.setSelected(false);
      this.PrayersTab.add(this.chckbxAttackPrayers);

      this.prayersAttackLabel.setText("This will use Attack Mulitplier Prayers (+5%, +10%, 15%) such as Mystic Might, Ultimate Strength");

      this.prayersAttackLabel.setBounds(new Rectangle(new Point(57, 159), this.prayersAttackLabel.getPreferredSize()));

      this.PrayersTab.add(this.prayersAttackLabel);

      this.prayersAttackLabel2.setText("and Incredible Reflexes automatically depending on your Prayer level and attack style.");

      this.prayersAttackLabel2.setBounds(new Rectangle(new Point(57, 179), this.prayersAttackLabel2.getPreferredSize()));

      this.PrayersTab.add(this.prayersAttackLabel2);

      this.chckbxSkinPrayers = new JCheckBox("Use 'Skin' Defence Multiplier Prayers");

      this.chckbxSkinPrayers.addActionListener(this);
      this.chckbxSkinPrayers.setBounds(30, 218, 400, 16);
      this.chckbxSkinPrayers.setSelected(false);
      this.PrayersTab.add(this.chckbxSkinPrayers);

      this.prayersSkinLabel.setText("This will use 'Skin' Defence Multiplier Prayers (Thick Skin, Rock Skin and Steel Skin)");

      this.prayersSkinLabel.setBounds(new Rectangle(new Point(57, 238), this.prayersSkinLabel.getPreferredSize()));

      this.PrayersTab.add(this.prayersSkinLabel);

      this.prayersSkinLabel2.setText("automatically depending on your Prayer level.");

      this.prayersSkinLabel2.setBounds(new Rectangle(new Point(57, 258), this.prayersSkinLabel2.getPreferredSize()));

      this.PrayersTab.add(this.prayersSkinLabel2);

      this.continueNotePrayers.setFont(new Font("SansSerif", 0, 16));
      this.continueNotePrayers.setText("Continue to next two tabs to set up your attack weapons and defence armour");

      this.continueNotePrayers.setBounds(new Rectangle(new Point(400 - (int)(this.continueNotePrayers.getPreferredSize().getWidth() / 2.0D), 530), this.continueNotePrayers.getPreferredSize()));

      this.PrayersTab.add(this.continueNotePrayers);
    }

    return this.PrayersTab;
  }

  private JPanel getMeleePanel()
  {
    this.meleePanel = new JPanel();
    this.meleePanel.setBounds(this.meleeArea);
    this.meleePanel.setBackground(this.enabledColor);

    this.meleeModel = new DefaultListModel();

    this.chckbxMelee = new JCheckBox("Melee");
    this.chckbxMelee.addActionListener(this);
    this.chckbxMelee.setBounds(295, 90, this.chckbxMelee.getPreferredSize().width, 16);

    this.chckbxMelee.setSelected(true);
    this.CombatStylesTab.add(this.chckbxMelee);

    this.meleeTitleText = new JLabel();
    this.meleeTitleText.setText("Wield:");
    this.meleeTitleText.setBounds(new Rectangle(new Point(410, 92), this.meleeTitleText.getPreferredSize()));

    this.CombatStylesTab.add(this.meleeTitleText);
    this.meleeScrollPane = new JScrollPane();
    this.meleeScrollPane.setBounds(325, 110, 220, 90);
    this.CombatStylesTab.add(this.meleeScrollPane);
    this.meleeScrollPane.setEnabled(true);
    this.meleeList = new JList(this.meleeModel);
    this.meleeScrollPane.setViewportView(this.meleeList);
    this.meleeList.addListSelectionListener(this);
    this.meleeList.setBorder(new LineBorder(new Color(255, 255, 255)));

    this.meleeAdd = new JButton();
    this.meleeAdd.setBounds(new Rectangle(285, 125, 40, 28));
    this.meleeAdd.setText(">");
    this.meleeAdd.addActionListener(this);
    this.CombatStylesTab.add(this.meleeAdd);
    this.meleeAdd.setEnabled(true);

    this.meleeRemove = new JButton();
    this.meleeRemove.setBounds(new Rectangle(285, 155, 40, 28));
    this.meleeRemove.setText("<");
    this.meleeRemove.addActionListener(this);
    this.CombatStylesTab.add(this.meleeRemove);
    this.meleeRemove.setEnabled(true);

    this.meleeOptionsTitle = new JLabel();
    this.meleeOptionsTitle.setText("Options:");
    this.meleeOptionsTitle.setBounds(new Rectangle(new Point(600, 92), this.meleeOptionsTitle.getPreferredSize()));

    this.CombatStylesTab.add(this.meleeOptionsTitle);
    this.meleeAttackStyleTitle = new JLabel();
    this.meleeAttackStyleTitle.setText("Attack Style:");
    this.meleeAttackStyleTitle.setBounds(new Rectangle(new Point(590, 120), this.meleeAttackStyleTitle.getPreferredSize()));

    this.CombatStylesTab.add(this.meleeAttackStyleTitle);
    this.meleeAttackStyleBox.setModel(new DefaultComboBoxModel(new String[] { "Attack EXP", "Strength EXP", "Defence EXP", "Shared EXP" }));

    this.meleeAttackStyleBox.setBounds(new Rectangle(new Point(565, 140), this.meleeAttackStyleBox.getPreferredSize()));

    this.meleeAttackStyleBox.addActionListener(this);
    this.CombatStylesTab.add(this.meleeAttackStyleBox);
    this.meleeAttackStyleBox.setEnabled(true);

    return this.meleePanel;
  }

  private JPanel getMagicPanel() {
    this.magicPanel = new JPanel();
    this.magicPanel.setBounds(this.magicArea);
    this.magicPanel.setBackground(this.enabledColor);

    this.magicModel = new DefaultListModel();

    this.chckbxMagic = new JCheckBox("Magic");
    this.chckbxMagic.addActionListener(this);
    this.chckbxMagic.setBounds(295, 210, this.chckbxMagic.getPreferredSize().width, 16);

    this.chckbxMagic.setSelected(true);
    this.CombatStylesTab.add(this.chckbxMagic);

    this.magicTitleText = new JLabel();
    this.magicTitleText.setText("Wield:");
    this.magicTitleText.setBounds(new Rectangle(new Point(410, 212), this.magicTitleText.getPreferredSize()));

    this.CombatStylesTab.add(this.magicTitleText);
    this.magicScrollPane = new JScrollPane();
    this.magicScrollPane.setBounds(325, 230, 220, 90);
    this.CombatStylesTab.add(this.magicScrollPane);
    this.magicScrollPane.setEnabled(true);
    this.magicList = new JList(this.magicModel);
    this.magicScrollPane.setViewportView(this.magicList);
    this.magicList.addListSelectionListener(this);
    this.magicList.setBorder(new LineBorder(new Color(255, 255, 255)));

    this.magicAdd = new JButton();
    this.magicAdd.setBounds(new Rectangle(285, 245, 40, 28));
    this.magicAdd.setText(">");
    this.magicAdd.addActionListener(this);
    this.CombatStylesTab.add(this.magicAdd);
    this.magicAdd.setEnabled(true);

    this.magicRemove = new JButton();
    this.magicRemove.setBounds(new Rectangle(285, 275, 40, 28));
    this.magicRemove.setText("<");
    this.magicRemove.addActionListener(this);
    this.CombatStylesTab.add(this.magicRemove);
    this.magicRemove.setEnabled(true);

    this.magicOptionsTitle = new JLabel();
    this.magicOptionsTitle.setText("Options:");
    this.magicOptionsTitle.setBounds(new Rectangle(new Point(600, 212), this.magicOptionsTitle.getPreferredSize()));

    this.CombatStylesTab.add(this.magicOptionsTitle);
    this.magicCastSpellTitle = new JLabel();
    this.magicCastSpellTitle.setText("Cast Spell:");
    this.magicCastSpellTitle.setBounds(new Rectangle(new Point(590, 240), this.magicCastSpellTitle.getPreferredSize()));

    this.CombatStylesTab.add(this.magicCastSpellTitle);
    this.magicCastSpell.setModel(new DefaultComboBoxModel(new String[] { "Auto Highest (F2P)", "Auto Highest (P2P)", "Fire Surge", "Earth Surge", "Water Surge", "Wind Surge", "Fire Wave", "Earth Wave", "Water Wave", "Wind Wave", "Fire Blast", "Earth Blast", "Water Blast", "Wind Blast", "Fire Bolt", "Earth Bolt", "Water Bolt", "Wind Bolt", "Fire Strike", "Earth Strike", "Water Strike", "Wind Strike", "Wind Rush", "Ice Barrage", "Blood Barrage", "Shadow Barrage", "Smoke Barrage", "Ice Blitz", "Blood Blitz", "Shadow Blitz", "Smoke Blitz", "Ice Burst", "Blood Burst", "Shadow Burst", "Smoke Burst", "Ice Rush", "Blood Rush", "Shadow Rush", "Smoke Rush", "Miasmic Barrage", "Miasmic Blitz", "Miasmic Burst", "Miasmic Rush" }));

    this.magicCastSpell.setBounds(new Rectangle(new Point(545, 260), this.magicCastSpell.getPreferredSize()));

    this.magicCastSpell.addActionListener(this);
    this.CombatStylesTab.add(this.magicCastSpell);
    this.magicCastSpell.setEnabled(true);

    return this.magicPanel;
  }

  private JPanel getRangePanel() {
    this.rangePanel = new JPanel();
    this.rangePanel.setBounds(this.rangeArea);
    this.rangePanel.setBackground(this.disabledColor);

    this.rangeModel = new DefaultListModel();

    this.chckbxRange = new JCheckBox("Range");
    this.chckbxRange.addActionListener(this);
    this.chckbxRange.setBounds(295, 330, this.chckbxRange.getPreferredSize().width, 16);

    this.chckbxRange.setSelected(false);
    this.CombatStylesTab.add(this.chckbxRange);

    this.rangeTitleText = new JLabel();
    this.rangeTitleText.setText("Wield:");
    this.rangeTitleText.setBounds(new Rectangle(new Point(410, 332), this.rangeTitleText.getPreferredSize()));

    this.CombatStylesTab.add(this.rangeTitleText);
    this.rangeScrollPane = new JScrollPane();
    this.rangeScrollPane.setBounds(325, 350, 220, 90);
    this.CombatStylesTab.add(this.rangeScrollPane);
    this.rangeScrollPane.setEnabled(false);
    this.rangeList = new JList(this.rangeModel);
    this.rangeScrollPane.setViewportView(this.rangeList);
    this.rangeList.addListSelectionListener(this);
    this.rangeList.setBorder(new LineBorder(new Color(255, 255, 255)));

    this.rangeAdd = new JButton();
    this.rangeAdd.setBounds(new Rectangle(285, 365, 40, 28));
    this.rangeAdd.setText(">");
    this.rangeAdd.addActionListener(this);
    this.CombatStylesTab.add(this.rangeAdd);
    this.rangeAdd.setEnabled(false);

    this.rangeRemove = new JButton();
    this.rangeRemove.setBounds(new Rectangle(285, 395, 40, 28));
    this.rangeRemove.setText("<");
    this.rangeRemove.addActionListener(this);
    this.CombatStylesTab.add(this.rangeRemove);
    this.rangeRemove.setEnabled(false);

    this.rangeOptionsTitle = new JLabel();
    this.rangeOptionsTitle.setText("Options:");
    this.rangeOptionsTitle.setBounds(new Rectangle(new Point(600, 332), this.rangeOptionsTitle.getPreferredSize()));

    this.CombatStylesTab.add(this.rangeOptionsTitle);
    this.rangeAttackStyleTitle = new JLabel();
    this.rangeAttackStyleTitle.setText("Attack Style:");
    this.rangeAttackStyleTitle.setBounds(new Rectangle(new Point(590, 360), this.rangeAttackStyleTitle.getPreferredSize()));

    this.CombatStylesTab.add(this.rangeAttackStyleTitle);
    this.rangeAttackStyleBox.setModel(new DefaultComboBoxModel(new String[] { "Accurate", "Rapid", "Long range" }));

    this.rangeAttackStyleBox.setBounds(new Rectangle(new Point(565, 380), this.rangeAttackStyleBox.getPreferredSize()));

    this.rangeAttackStyleBox.addActionListener(this);
    this.CombatStylesTab.add(this.rangeAttackStyleBox);
    this.rangeAttackStyleBox.setEnabled(false);

    return this.rangePanel;
  }

  private JPanel getCombatStylesTab() {
    if (this.CombatStylesTab == null) {
      this.CombatStylesTab = new JPanel();
      this.CombatStylesTab.setLayout(null);
      if (this.screenHeight < 750) {
        this.CombatStylesTab.setBounds(0, 0, 775, 660);
        this.CombatStylesTab.setPreferredSize(new Dimension(775, 700));
      }

      this.model = new DefaultListModel();

      this.inventoryTitleText = new JLabel();
      this.inventoryTitleText.setText("Your Inventory:");
      this.inventoryTitleText.setBounds(new Rectangle(new Point(60, 10), this.inventoryTitleText.getPreferredSize()));

      this.CombatStylesTab.add(this.inventoryTitleText);
      this.scrollPane = new JScrollPane();
      this.scrollPane.setBounds(20, 30, 220, 485);
      this.CombatStylesTab.add(this.scrollPane);
      this.invList = new JList(this.model);
      this.scrollPane.setViewportView(this.invList);
      this.invList.addListSelectionListener(this);
      this.invList.setBorder(new LineBorder(new Color(255, 255, 255)));

      int i = 0;
      while (i < this.this$0.inventoryItemsNum) {
        Object localObject = Integer.toString(this.this$0.inventoryItemsIDs[i]);

        int j = 5 - ((String)localObject).length();
        String str = "";
        int k = 0;
        while (k < j) {
          str = new StringBuilder().append(str).append("0").toString();
          k++;
        }
        str = new StringBuilder().append(str).append((String)localObject).toString();
        localObject = str;
        this.model.add(this.model.getSize(), new StringBuilder().append((String)localObject).append(" - ").append(this.this$0.inventoryItemsNames[i]).toString());

        i++;
      }

      this.combatStylesText1.setFont(new Font("SansSerif", 0, 12));
      this.combatStylesText2.setFont(new Font("SansSerif", 0, 12));
      this.combatStylesText3.setFont(new Font("SansSerif", 0, 12));
      this.combatStylesText1.setText("These are the different attack styles the script can use.");

      this.combatStylesText2.setText("The items in the wield boxes will be equipped when using that style.");

      this.combatStylesText3.setText("Select inventory items and use the '>' button to add to the wield items.");

      this.combatStylesText1.setBounds(new Rectangle(new Point(283, 22), this.combatStylesText1.getPreferredSize()));

      this.combatStylesText2.setBounds(new Rectangle(new Point(283, 38), this.combatStylesText2.getPreferredSize()));

      this.combatStylesText3.setBounds(new Rectangle(new Point(283, 54), this.combatStylesText3.getPreferredSize()));

      this.CombatStylesTab.add(this.combatStylesText1);
      this.CombatStylesTab.add(this.combatStylesText2);
      this.CombatStylesTab.add(this.combatStylesText3);

      this.CombatStylesTab.add(getMeleePanel());

      this.CombatStylesTab.add(getMagicPanel());

      this.CombatStylesTab.add(getRangePanel());

      this.startCombatStyleText.setFont(new Font("SansSerif", 0, 13));
      this.startCombatStyleText.setText("First Attack Style to Use: ");
      this.startCombatStyleText.setBounds(new Rectangle(new Point(283, 450), this.startCombatStyleText.getPreferredSize()));

      this.CombatStylesTab.add(this.startCombatStyleText);
      refreshStartStyleMenu();
      this.startCombatStyle.setBounds(new Rectangle(440, 446, 100, 27));

      this.startCombatStyle.addActionListener(this);
      this.CombatStylesTab.add(this.startCombatStyle);

      this.chckbxFSGame = new JCheckBox("Use this at start of every game");

      this.chckbxFSGame.addActionListener(this);
      this.chckbxFSGame.setSelected(false);
      this.chckbxFSGame.setBounds(new Rectangle(new Point(535, 446), this.chckbxFSGame.getPreferredSize()));

      this.CombatStylesTab.add(this.chckbxFSGame);

      this.switchTriggersTitle.setFont(new Font("SansSerif", 1, 13));

      this.switchTriggersTitle.setText("Switch Attack Style...  ");
      this.switchTriggersTitle.setBounds(new Rectangle(new Point(283, 470), this.switchTriggersTitle.getPreferredSize()));

      this.CombatStylesTab.add(this.switchTriggersTitle);

      this.prayerTrigger = new JCheckBox("When opponent uses prayer protection... [ UNDER CONSTRUCTION ]");

      this.prayerTrigger.addActionListener(this);
      this.prayerTrigger.setSelected(false);
      this.prayerTrigger.setEnabled(false);
      this.prayerTrigger.setBounds(new Rectangle(new Point(280, 488), this.prayerTrigger.getPreferredSize()));

      this.CombatStylesTab.add(this.prayerTrigger);
      this.meleeSafeSpotTrigger = new JCheckBox("When attacking with melee and opponent uses a safespot");

      this.meleeSafeSpotTrigger.addActionListener(this);
      this.meleeSafeSpotTrigger.setSelected(false);
      this.meleeSafeSpotTrigger.setBounds(new Rectangle(new Point(280, 508), this.meleeSafeSpotTrigger.getPreferredSize()));

      this.CombatStylesTab.add(this.meleeSafeSpotTrigger);
      this.randomGameTrigger = new JCheckBox("Randomly Every 1-5 FOG Games");

      this.randomGameTrigger.addActionListener(this);
      this.randomGameTrigger.setBounds(new Rectangle(new Point(280, 528), this.randomGameTrigger.getPreferredSize()));

      this.randomGameTrigger.setSelected(true);
      this.CombatStylesTab.add(this.randomGameTrigger);
      this.everyGameTrigger = new JCheckBox("Every FOG Game");
      this.everyGameTrigger.addActionListener(this);
      this.everyGameTrigger.setBounds(new Rectangle(new Point(280, 548), this.everyGameTrigger.getPreferredSize()));

      this.everyGameTrigger.setSelected(false);
      this.CombatStylesTab.add(this.everyGameTrigger);
      this.hitTrigger = new JCheckBox("Randomly Every ");
      this.hitTrigger.addActionListener(this);
      this.hitTrigger.setBounds(new Rectangle(new Point(280, 568), this.hitTrigger.getPreferredSize()));

      this.hitTrigger.setSelected(false);
      this.CombatStylesTab.add(this.hitTrigger);
      this.hitTriggerBox1.setBounds(410, 572, 20, 20);
      this.hitTriggerBox1.setBorder(new LineBorder(new Color(0, 0, 0, 255)));

      this.hitTriggerBox1.setText("3");
      this.CombatStylesTab.add(this.hitTriggerBox1);
      this.hitTriggerText1.setFont(new Font("SansSerif", 0, 13));
      this.hitTriggerText1.setText("to");
      this.hitTriggerText1.setBounds(new Rectangle(new Point(435, 573), this.hitTriggerText1.getPreferredSize()));

      this.CombatStylesTab.add(this.hitTriggerText1);
      this.hitTriggerBox2.setBounds(455, 572, 20, 20);
      this.hitTriggerBox2.setBorder(new LineBorder(new Color(0, 0, 0, 255)));

      this.hitTriggerBox2.setText("5");
      this.CombatStylesTab.add(this.hitTriggerBox2);
      this.hitTriggerText2.setFont(new Font("SansSerif", 0, 13));
      this.hitTriggerText2.setText("Hitsplats on Opponent");
      this.hitTriggerText2.setBounds(new Rectangle(new Point(480, 573), this.hitTriggerText2.getPreferredSize()));

      this.CombatStylesTab.add(this.hitTriggerText2);

      this.inventoryNoteText1.setFont(new Font("SansSerif", 0, 13));
      this.inventoryNoteText1.setText("This list should have");
      this.inventoryNoteText1.setBounds(new Rectangle(new Point(26, 520), this.inventoryNoteText1.getPreferredSize()));

      this.CombatStylesTab.add(this.inventoryNoteText1);
      this.inventoryNoteText2.setFont(new Font("SansSerif", 0, 13));
      this.inventoryNoteText2.setText("all your items from your");
      this.inventoryNoteText2.setBounds(new Rectangle(new Point(26, 540), this.inventoryNoteText2.getPreferredSize()));

      this.CombatStylesTab.add(this.inventoryNoteText2);
      this.inventoryNoteText3.setFont(new Font("SansSerif", 0, 13));
      this.inventoryNoteText3.setText("equipment and inventory.");
      this.inventoryNoteText3.setBounds(new Rectangle(new Point(26, 560), this.inventoryNoteText3.getPreferredSize()));

      this.CombatStylesTab.add(this.inventoryNoteText3);
    }

    return (JPanel)this.CombatStylesTab;
  }

  private JPanel getMeleePanelDefence()
  {
    this.meleePanelDefence = new JPanel();
    this.meleePanelDefence.setBounds(this.meleeAreaDefence);
    this.meleePanelDefence.setBackground(this.enabledColor);

    this.meleeModelDefence = new DefaultListModel();

    this.chckbxMeleeDefence = new JCheckBox("Melee");
    this.chckbxMeleeDefence.addActionListener(this);
    this.chckbxMeleeDefence.setBounds(295, 90, this.chckbxMeleeDefence.getPreferredSize().width, 16);

    this.chckbxMeleeDefence.setSelected(true);
    this.CombatStylesTabDefence.add(this.chckbxMeleeDefence);

    this.meleeTitleTextDefence = new JLabel();
    this.meleeTitleTextDefence.setText("Wield:");
    this.meleeTitleTextDefence.setBounds(new Rectangle(new Point(410, 92), this.meleeTitleTextDefence.getPreferredSize()));

    this.CombatStylesTabDefence.add(this.meleeTitleTextDefence);
    this.meleeScrollPaneDefence = new JScrollPane();
    this.meleeScrollPaneDefence.setBounds(325, 110, 220, 90);
    this.CombatStylesTabDefence.add(this.meleeScrollPaneDefence);
    this.meleeScrollPaneDefence.setEnabled(true);
    this.meleeListDefence = new JList(this.meleeModelDefence);
    this.meleeScrollPaneDefence.setViewportView(this.meleeListDefence);
    this.meleeListDefence.addListSelectionListener(this);
    this.meleeListDefence.setBorder(new LineBorder(new Color(255, 255, 255)));

    this.meleeAddDefence = new JButton();
    this.meleeAddDefence.setBounds(new Rectangle(285, 125, 40, 28));
    this.meleeAddDefence.setText(">");
    this.meleeAddDefence.addActionListener(this);
    this.CombatStylesTabDefence.add(this.meleeAddDefence);
    this.meleeAdd.setEnabled(true);

    this.meleeRemoveDefence = new JButton();
    this.meleeRemoveDefence.setBounds(new Rectangle(285, 155, 40, 28));

    this.meleeRemoveDefence.setText("<");
    this.meleeRemoveDefence.addActionListener(this);
    this.CombatStylesTabDefence.add(this.meleeRemoveDefence);
    this.meleeRemoveDefence.setEnabled(true);

    return this.meleePanelDefence;
  }

  private JPanel getMagicPanelDefence() {
    this.magicPanelDefence = new JPanel();
    this.magicPanelDefence.setBounds(this.magicAreaDefence);
    this.magicPanelDefence.setBackground(this.enabledColor);

    this.magicModelDefence = new DefaultListModel();

    this.chckbxMagicDefence = new JCheckBox("Magic");
    this.chckbxMagicDefence.addActionListener(this);
    this.chckbxMagicDefence.setBounds(295, 210, this.chckbxMagicDefence.getPreferredSize().width, 16);

    this.chckbxMagicDefence.setSelected(true);
    this.CombatStylesTabDefence.add(this.chckbxMagicDefence);

    this.magicTitleTextDefence = new JLabel();
    this.magicTitleTextDefence.setText("Wield:");
    this.magicTitleTextDefence.setBounds(new Rectangle(new Point(410, 212), this.magicTitleTextDefence.getPreferredSize()));

    this.CombatStylesTabDefence.add(this.magicTitleTextDefence);
    this.magicScrollPaneDefence = new JScrollPane();
    this.magicScrollPaneDefence.setBounds(325, 230, 220, 90);
    this.CombatStylesTabDefence.add(this.magicScrollPaneDefence);
    this.magicScrollPaneDefence.setEnabled(true);
    this.magicListDefence = new JList(this.magicModelDefence);
    this.magicScrollPaneDefence.setViewportView(this.magicListDefence);
    this.magicListDefence.addListSelectionListener(this);
    this.magicListDefence.setBorder(new LineBorder(new Color(255, 255, 255)));

    this.magicAddDefence = new JButton();
    this.magicAddDefence.setBounds(new Rectangle(285, 245, 40, 28));
    this.magicAddDefence.setText(">");
    this.magicAddDefence.addActionListener(this);
    this.CombatStylesTabDefence.add(this.magicAddDefence);
    this.magicAddDefence.setEnabled(true);

    this.magicRemoveDefence = new JButton();
    this.magicRemoveDefence.setBounds(new Rectangle(285, 275, 40, 28));

    this.magicRemoveDefence.setText("<");
    this.magicRemoveDefence.addActionListener(this);
    this.CombatStylesTabDefence.add(this.magicRemoveDefence);
    this.magicRemoveDefence.setEnabled(true);

    return this.magicPanelDefence;
  }

  private JPanel getRangePanelDefence() {
    this.rangePanelDefence = new JPanel();
    this.rangePanelDefence.setBounds(this.rangeAreaDefence);
    this.rangePanelDefence.setBackground(this.disabledColor);

    this.rangeModelDefence = new DefaultListModel();

    this.chckbxRangeDefence = new JCheckBox("Range");
    this.chckbxRangeDefence.addActionListener(this);
    this.chckbxRangeDefence.setBounds(295, 330, this.chckbxRangeDefence.getPreferredSize().width, 16);

    this.chckbxRangeDefence.setSelected(false);
    this.CombatStylesTabDefence.add(this.chckbxRangeDefence);

    this.rangeTitleTextDefence = new JLabel();
    this.rangeTitleTextDefence.setText("Wield:");
    this.rangeTitleTextDefence.setBounds(new Rectangle(new Point(410, 332), this.rangeTitleTextDefence.getPreferredSize()));

    this.CombatStylesTabDefence.add(this.rangeTitleTextDefence);
    this.rangeScrollPaneDefence = new JScrollPane();
    this.rangeScrollPaneDefence.setBounds(325, 350, 220, 90);
    this.CombatStylesTabDefence.add(this.rangeScrollPaneDefence);
    this.rangeScrollPaneDefence.setEnabled(false);
    this.rangeListDefence = new JList(this.rangeModelDefence);
    this.rangeScrollPaneDefence.setViewportView(this.rangeListDefence);
    this.rangeListDefence.addListSelectionListener(this);
    this.rangeListDefence.setBorder(new LineBorder(new Color(255, 255, 255)));

    this.rangeAddDefence = new JButton();
    this.rangeAddDefence.setBounds(new Rectangle(285, 365, 40, 28));
    this.rangeAddDefence.setText(">");
    this.rangeAddDefence.addActionListener(this);
    this.CombatStylesTabDefence.add(this.rangeAddDefence);
    this.rangeAddDefence.setEnabled(false);

    this.rangeRemoveDefence = new JButton();
    this.rangeRemoveDefence.setBounds(new Rectangle(285, 395, 40, 28));

    this.rangeRemoveDefence.setText("<");
    this.rangeRemoveDefence.addActionListener(this);
    this.CombatStylesTabDefence.add(this.rangeRemoveDefence);
    this.rangeRemoveDefence.setEnabled(false);

    return this.rangePanelDefence;
  }

  private JPanel getCombatStylesTabDefence() {
    if (this.CombatStylesTabDefence == null) {
      this.CombatStylesTabDefence = new JPanel();
      this.CombatStylesTabDefence.setLayout(null);
      if (this.screenHeight < 750) {
        this.CombatStylesTabDefence.setBounds(0, 0, 775, 660);
        this.CombatStylesTabDefence.setPreferredSize(new Dimension(775, 700));
      }

      this.modelDefence = new DefaultListModel();

      this.inventoryTitleTextDefence = new JLabel();
      this.inventoryTitleTextDefence.setText("Your Inventory:");
      this.inventoryTitleTextDefence.setBounds(new Rectangle(new Point(60, 10), this.inventoryTitleTextDefence.getPreferredSize()));

      this.CombatStylesTabDefence.add(this.inventoryTitleTextDefence);
      this.scrollPaneDefence = new JScrollPane();
      this.scrollPaneDefence.setBounds(20, 30, 220, 485);
      this.CombatStylesTabDefence.add(this.scrollPaneDefence);
      this.invListDefence = new JList(this.modelDefence);
      this.scrollPaneDefence.setViewportView(this.invListDefence);
      this.invListDefence.addListSelectionListener(this);
      this.invListDefence.setBorder(new LineBorder(new Color(255, 255, 255)));

      int i = 0;
      while (i < this.this$0.inventoryItemsNum) {
        Object localObject = Integer.toString(this.this$0.inventoryItemsIDs[i]);

        int j = 5 - ((String)localObject).length();
        String str = "";
        int k = 0;
        while (k < j) {
          str = new StringBuilder().append(str).append("0").toString();
          k++;
        }
        str = new StringBuilder().append(str).append((String)localObject).toString();
        localObject = str;
        this.modelDefence.add(this.modelDefence.getSize(), new StringBuilder().append((String)localObject).append(" - ").append(this.this$0.inventoryItemsNames[i]).toString());

        i++;
      }

      this.combatStylesText1Defence.setFont(new Font("SansSerif", 0, 12));

      this.combatStylesText2Defence.setFont(new Font("SansSerif", 0, 12));

      this.combatStylesText3Defence.setFont(new Font("SansSerif", 0, 12));

      this.combatStylesText1Defence.setText("These are the different defence styles the script can use.");

      this.combatStylesText2Defence.setText("The items in the wield boxes will be equipped when being attacked by that style.");

      this.combatStylesText3Defence.setText("Select inventory items and use the '>' button to add to the wield items.");

      this.combatStylesText1Defence.setBounds(new Rectangle(new Point(283, 22), this.combatStylesText1Defence.getPreferredSize()));

      this.combatStylesText2Defence.setBounds(new Rectangle(new Point(283, 38), this.combatStylesText2Defence.getPreferredSize()));

      this.combatStylesText3Defence.setBounds(new Rectangle(new Point(283, 54), this.combatStylesText3Defence.getPreferredSize()));

      this.CombatStylesTabDefence.add(this.combatStylesText1Defence);
      this.CombatStylesTabDefence.add(this.combatStylesText2Defence);
      this.CombatStylesTabDefence.add(this.combatStylesText3Defence);

      this.CombatStylesTabDefence.add(getMeleePanelDefence());

      this.CombatStylesTabDefence.add(getMagicPanelDefence());

      this.CombatStylesTabDefence.add(getRangePanelDefence());

      this.stylesNoteDefence1.setFont(new Font("SansSerif", 0, 12));
      this.stylesNoteDefence1.setText("These items will be equipped when being hunted and the enemy attacks you");

      this.stylesNoteDefence1.setBounds(new Rectangle(new Point(283, 480), this.stylesNoteDefence1.getPreferredSize()));

      this.CombatStylesTabDefence.add(this.stylesNoteDefence1);
      this.stylesNoteDefence2.setFont(new Font("SansSerif", 0, 12));
      this.stylesNoteDefence2.setText("with any of the enabled styles above.");

      this.stylesNoteDefence2.setBounds(new Rectangle(new Point(283, 496), this.stylesNoteDefence2.getPreferredSize()));

      this.CombatStylesTabDefence.add(this.stylesNoteDefence2);
      this.stylesNoteDefence3.setFont(new Font("SansSerif", 1, 12));

      this.stylesNoteDefence3.setText("If no items are entered, the script will just wear what it wore last round");

      this.stylesNoteDefence3.setBounds(new Rectangle(new Point(283, 520), this.stylesNoteDefence3.getPreferredSize()));

      this.CombatStylesTabDefence.add(this.stylesNoteDefence3);

      this.inventoryNoteText1Defence.setFont(new Font("SansSerif", 0, 13));

      this.inventoryNoteText1Defence.setText("This list should have");
      this.inventoryNoteText1Defence.setBounds(new Rectangle(new Point(26, 520), this.inventoryNoteText1Defence.getPreferredSize()));

      this.CombatStylesTabDefence.add(this.inventoryNoteText1Defence);
      this.inventoryNoteText2Defence.setFont(new Font("SansSerif", 0, 13));

      this.inventoryNoteText2Defence.setText("all your items from your");

      this.inventoryNoteText2Defence.setBounds(new Rectangle(new Point(26, 540), this.inventoryNoteText2Defence.getPreferredSize()));

      this.CombatStylesTabDefence.add(this.inventoryNoteText2Defence);
      this.inventoryNoteText3Defence.setFont(new Font("SansSerif", 0, 13));

      this.inventoryNoteText3Defence.setText("equipment and inventory.");

      this.inventoryNoteText3Defence.setBounds(new Rectangle(new Point(26, 560), this.inventoryNoteText3Defence.getPreferredSize()));

      this.CombatStylesTabDefence.add(this.inventoryNoteText3Defence);
    }

    return (JPanel)this.CombatStylesTabDefence;
  }

  public void actionPerformed(ActionEvent paramActionEvent)
  {
    if (paramActionEvent.getSource() == this.chckbxDmode) {
      this.this$0.dmode = this.chckbxDmode.isSelected();
    }
    if (paramActionEvent.getSource() == this.meleeAttackStyleBox) {
      this.this$0.meleeAttackStyle = this.meleeAttackStyleBox.getSelectedItem().toString();
    }

    if (paramActionEvent.getSource() == this.rangeAttackStyleBox) {
      this.this$0.rangeAttackStyle = this.rangeAttackStyleBox.getSelectedItem().toString();
    }

    if (paramActionEvent.getSource() == this.magicCastSpell) {
      this.this$0.magicSpell = this.magicCastSpell.getSelectedItem().toString();
    }
    if (paramActionEvent.getSource() == this.prayerTrigger) {
      this.this$0.prayerSwitch = this.prayerTrigger.isSelected();
    }
    if (paramActionEvent.getSource() == this.meleeSafeSpotTrigger) {
      this.this$0.meleeSafeSpotSwitch = this.meleeSafeSpotTrigger.isSelected();
    }
    if (paramActionEvent.getSource() == this.randomGameTrigger) {
      this.this$0.randomGameSwitch = this.randomGameTrigger.isSelected();
      if (this.randomGameTrigger.isSelected()) {
        this.everyGameTrigger.setSelected(false);
        this.this$0.everyGameSwitch = false;
        this.hitTrigger.setSelected(false);
        this.this$0.hitSwitch = false;
      }
    }
    if (paramActionEvent.getSource() == this.everyGameTrigger) {
      this.this$0.everyGameSwitch = this.everyGameTrigger.isSelected();
      if (this.everyGameTrigger.isSelected()) {
        this.randomGameTrigger.setSelected(false);
        this.this$0.randomGameSwitch = false;
        this.hitTrigger.setSelected(false);
        this.this$0.hitSwitch = false;
      }
    }
    if (paramActionEvent.getSource() == this.hitTrigger) {
      this.this$0.hitSwitch = this.hitTrigger.isSelected();
      if (this.hitTrigger.isSelected()) {
        this.randomGameTrigger.setSelected(false);
        this.this$0.randomGameSwitch = false;
        this.everyGameTrigger.setSelected(false);
        this.this$0.everyGameSwitch = false;
      }

    }

    if (paramActionEvent.getSource() == this.meleeAdd) {
      meleeAddMethod();
    }
    if (paramActionEvent.getSource() == this.meleeRemove) {
      try {
        int i = this.meleeList.getSelectedIndex();
        while (i < 10) {
          this.this$0.meleeListIDsAdded[i] = this.this$0.meleeListIDsAdded[(i + 1)];
          i++;
        }
        this.this$0.meleeListIDsAdded[10] = -1;
        this.meleeModel.removeElementAt(this.meleeList.getSelectedIndex());
      }
      catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException1)
      {
      }
    }
    if (paramActionEvent.getSource() == this.magicAdd) {
      magicAddMethod();
    }
    if (paramActionEvent.getSource() == this.magicRemove) {
      try {
        int j = this.magicList.getSelectedIndex();
        while (j < 10) {
          this.this$0.magicListIDsAdded[j] = this.this$0.magicListIDsAdded[(j + 1)];
          j++;
        }
        this.this$0.magicListIDsAdded[10] = -1;
        this.magicModel.removeElementAt(this.magicList.getSelectedIndex());
      }
      catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException2)
      {
      }
    }
    if (paramActionEvent.getSource() == this.rangeAdd) {
      rangeAddMethod();
    }
    if (paramActionEvent.getSource() == this.rangeRemove) {
      try {
        int k = this.rangeList.getSelectedIndex();
        while (k < 10) {
          this.this$0.rangeListIDsAdded[k] = this.this$0.rangeListIDsAdded[(k + 1)];
          k++;
        }
        this.this$0.rangeListIDsAdded[10] = -1;
        this.rangeModel.removeElementAt(this.rangeList.getSelectedIndex());
      }
      catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException3)
      {
      }
    }

    if (paramActionEvent.getSource() == this.meleeAddDefence) {
      meleeAddMethodDefence();
    }
    if (paramActionEvent.getSource() == this.meleeRemoveDefence) {
      try {
        int m = this.meleeListDefence.getSelectedIndex();
        while (m < 10) {
          this.this$0.meleeListIDsAddedDefence[m] = this.this$0.meleeListIDsAddedDefence[(m + 1)];
          m++;
        }
        this.this$0.meleeListIDsAddedDefence[10] = -1;
        this.meleeModelDefence.removeElementAt(this.meleeListDefence.getSelectedIndex());
      }
      catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException4)
      {
      }
    }

    if (paramActionEvent.getSource() == this.magicAddDefence) {
      magicAddMethodDefence();
    }
    if (paramActionEvent.getSource() == this.magicRemoveDefence) {
      try {
        int n = this.magicListDefence.getSelectedIndex();
        while (n < 10) {
          this.this$0.magicListIDsAddedDefence[n] = this.this$0.magicListIDsAddedDefence[(n + 1)];
          n++;
        }
        this.this$0.magicListIDsAddedDefence[10] = -1;
        this.magicModelDefence.removeElementAt(this.magicListDefence.getSelectedIndex());
      }
      catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException5)
      {
      }
    }

    if (paramActionEvent.getSource() == this.rangeAddDefence) {
      rangeAddMethodDefence();
    }
    if (paramActionEvent.getSource() == this.rangeRemoveDefence) {
      try {
        int i1 = this.rangeListDefence.getSelectedIndex();
        while (i1 < 10) {
          this.this$0.rangeListIDsAddedDefence[i1] = this.this$0.rangeListIDsAddedDefence[(i1 + 1)];
          i1++;
        }
        this.this$0.rangeListIDsAddedDefence[10] = -1;
        this.rangeModelDefence.removeElementAt(this.rangeListDefence.getSelectedIndex());
      }
      catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException6)
      {
      }
    }
    if (paramActionEvent.getSource() == this.chckbxAntiBan) {
      this.this$0.useAntiBan = this.chckbxAntiBan.isSelected();
    }
    if (paramActionEvent.getSource() == this.chckbxBandages) {
      this.this$0.useBandages = this.chckbxBandages.isSelected();
    }
    if (paramActionEvent.getSource() == this.teleOrbBox) {
      this.this$0.teleorbLong = this.teleOrbBox.getSelectedItem().toString();
    }
    if (paramActionEvent.getSource() == this.chckbxBankTokens) {
      this.this$0.bankTokens = this.chckbxBankTokens.isSelected();
    }
    if (paramActionEvent.getSource() == this.chckbxSearch) {
      this.this$0.search = this.chckbxSearch.isSelected();
    }
    if (paramActionEvent.getSource() == this.chckbxScreenshots) {
      this.this$0.screenshots = this.chckbxScreenshots.isSelected();
    }
    if (paramActionEvent.getSource() == this.chckbxPrayers) {
      this.this$0.usePrayers = this.chckbxPrayers.isSelected();
    }
    if (paramActionEvent.getSource() == this.chckbxAttackPrayers) {
      this.this$0.useAttackPrayers = this.chckbxAttackPrayers.isSelected();
    }
    if (paramActionEvent.getSource() == this.chckbxSkinPrayers) {
      this.this$0.useSkinPrayers = this.chckbxSkinPrayers.isSelected();
    }
    if (paramActionEvent.getSource() == this.chckbxQuickPrayers) {
      this.this$0.useQuickPrayers = this.chckbxQuickPrayers.isSelected();
    }
    if (paramActionEvent.getSource() == this.quickPrayersBox) {
      this.this$0.quickPrayersLong = this.quickPrayersBox.getSelectedItem().toString();
    }
    if (paramActionEvent.getSource() == this.startCombatStyle) {
      this.this$0.firstStyle = this.startCombatStyle.getSelectedItem().toString();
    }
    if (paramActionEvent.getSource() == this.chckbxFSGame) {
      this.this$0.FSGame = this.chckbxFSGame.isSelected();
    }

    if (paramActionEvent.getSource() == this.chckbxMelee) {
      this.this$0.meleeActive = this.chckbxMelee.isSelected();
      if ((!this.this$0.meleeActive) && (!this.this$0.magicActive) && (!this.this$0.rangeActive)) {
        JOptionPane.showMessageDialog(null, "At least one Attack Style must be selected");

        this.chckbxMelee.setSelected(true);
        this.this$0.meleeActive = true;
      }
      else {
        this.meleeScrollPane.setEnabled(this.chckbxMelee.isSelected());
        this.meleeAdd.setEnabled(this.chckbxMelee.isSelected());
        this.meleeRemove.setEnabled(this.chckbxMelee.isSelected());
        this.meleeAttackStyleBox.setEnabled(this.chckbxMelee.isSelected());
        if (this.chckbxMelee.isSelected()) {
          this.this$0.startStylesP[0] = "Melee";
          this.meleePanel.setBackground(this.enabledColor);
        } else {
          this.this$0.startStylesP[0] = "NULL";
          this.meleePanel.setBackground(this.disabledColor);
        }
        refreshStartStyleMenu();
        this.CombatStylesTab.repaint(this.meleeArea);
      }
    }
    if (paramActionEvent.getSource() == this.chckbxMagic) {
      this.this$0.magicActive = this.chckbxMagic.isSelected();
      if ((!this.this$0.meleeActive) && (!this.this$0.magicActive) && (!this.this$0.rangeActive)) {
        JOptionPane.showMessageDialog(null, "At least one Attack Style must be selected");

        this.chckbxMagic.setSelected(true);
        this.this$0.magicActive = true;
      } else {
        this.magicScrollPane.setEnabled(this.chckbxMagic.isSelected());
        this.magicAdd.setEnabled(this.chckbxMagic.isSelected());
        this.magicRemove.setEnabled(this.chckbxMagic.isSelected());
        this.magicCastSpell.setEnabled(this.chckbxMagic.isSelected());
        if (this.chckbxMagic.isSelected()) {
          this.this$0.startStylesP[1] = "Magic";
          this.magicPanel.setBackground(this.enabledColor);
        } else {
          this.this$0.startStylesP[1] = "NULL";
          this.magicPanel.setBackground(this.disabledColor);
        }
        refreshStartStyleMenu();
        this.CombatStylesTab.repaint(this.magicArea);
      }
    }
    if (paramActionEvent.getSource() == this.chckbxRange) {
      this.this$0.rangeActive = this.chckbxRange.isSelected();
      if ((!this.this$0.meleeActive) && (!this.this$0.magicActive) && (!this.this$0.rangeActive)) {
        JOptionPane.showMessageDialog(null, "At least one Attack Style must be selected");

        this.chckbxRange.setSelected(true);
        this.this$0.rangeActive = true;
      } else {
        this.rangeScrollPane.setEnabled(this.chckbxRange.isSelected());
        this.rangeAdd.setEnabled(this.chckbxRange.isSelected());
        this.rangeRemove.setEnabled(this.chckbxRange.isSelected());
        this.rangeAttackStyleBox.setEnabled(this.chckbxRange.isSelected());
        if (this.chckbxRange.isSelected()) {
          this.this$0.startStylesP[2] = "Range";
          this.rangePanel.setBackground(this.enabledColor);
        } else {
          this.this$0.startStylesP[2] = "NULL";
          this.rangePanel.setBackground(this.disabledColor);
        }
        refreshStartStyleMenu();
        this.CombatStylesTab.repaint(this.rangeArea);
      }

    }

    if (paramActionEvent.getSource() == this.chckbxMeleeDefence) {
      this.this$0.meleeActiveDefence = this.chckbxMeleeDefence.isSelected();
      this.meleeScrollPaneDefence.setEnabled(this.chckbxMeleeDefence.isSelected());

      this.meleeAddDefence.setEnabled(this.chckbxMeleeDefence.isSelected());
      this.meleeRemoveDefence.setEnabled(this.chckbxMeleeDefence.isSelected());
      if (this.chckbxMeleeDefence.isSelected())
        this.meleePanelDefence.setBackground(this.enabledColor);
      else {
        this.meleePanelDefence.setBackground(this.disabledColor);
      }
      this.CombatStylesTabDefence.repaint(this.meleeAreaDefence);
    }
    if (paramActionEvent.getSource() == this.chckbxMagicDefence) {
      this.this$0.magicActiveDefence = this.chckbxMagicDefence.isSelected();
      this.magicScrollPaneDefence.setEnabled(this.chckbxMagicDefence.isSelected());

      this.magicAddDefence.setEnabled(this.chckbxMagicDefence.isSelected());
      this.magicRemoveDefence.setEnabled(this.chckbxMagicDefence.isSelected());
      if (this.chckbxMagicDefence.isSelected())
        this.magicPanelDefence.setBackground(this.enabledColor);
      else {
        this.magicPanelDefence.setBackground(this.disabledColor);
      }
      this.CombatStylesTabDefence.repaint(this.magicAreaDefence);
    }
    if (paramActionEvent.getSource() == this.chckbxRangeDefence) {
      this.this$0.rangeActiveDefence = this.chckbxRangeDefence.isSelected();
      this.rangeScrollPaneDefence.setEnabled(this.chckbxRangeDefence.isSelected());

      this.rangeAddDefence.setEnabled(this.chckbxRangeDefence.isSelected());
      this.rangeRemoveDefence.setEnabled(this.chckbxRangeDefence.isSelected());
      if (this.chckbxRangeDefence.isSelected())
        this.rangePanelDefence.setBackground(this.enabledColor);
      else {
        this.rangePanelDefence.setBackground(this.disabledColor);
      }
      this.CombatStylesTabDefence.repaint(this.rangeAreaDefence);
    }

    if (paramActionEvent.getSource() == this.Save) {
      this.statusLabel.setText("Saving...");
      setStatusLabelBounds();
      try
      {
        BufferedWriter localBufferedWriter = new BufferedWriter(new FileWriter(this.this$0.settingsFile));

        localBufferedWriter.write(new StringBuilder().append("FOGRunner Settings - Version:").append(this.this$0.getVersion()).toString());
        localBufferedWriter.newLine();

        localBufferedWriter.write(new StringBuilder().append(this.chckbxAntiBan.isSelected() ? "true" : "false").append(":").append(this.chckbxBandages.isSelected() ? "true" : "false").append(":").append(this.teleOrbBox.getSelectedIndex()).append(":").append(this.chckbxBankTokens.isSelected() ? "true" : "false").append(":").append(this.bankTokensNum.getText()).append(":").append(this.chckbxSearch.isSelected() ? "true" : "false").append(":").append(this.chckbxScreenshots.isSelected() ? "true" : "false").append(":").append(this.mouseSpeedBox.getText()).append(":").append(this.chckbxDmode.isSelected() ? "true" : "false").toString());

        localBufferedWriter.newLine();

        localBufferedWriter.write(new StringBuilder().append(this.chckbxQuickPrayers.isSelected() ? "true" : "false").append(":").append(this.quickPrayersBox.getSelectedIndex()).append(":").append(this.chckbxPrayers.isSelected() ? "true" : "false").append(":").append(this.chckbxAttackPrayers.isSelected() ? "true" : "false").append(":").append(this.chckbxSkinPrayers.isSelected() ? "true" : "false").toString());

        localBufferedWriter.newLine();

        localBufferedWriter.write(new StringBuilder().append(this.chckbxMelee.isSelected() ? "true" : "false").append(":").append(this.meleeAttackStyleBox.getSelectedIndex()).toString());

        localBufferedWriter.newLine();
        int i3 = 0;
        while (i3 < this.meleeModel.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.meleeModel.get(i3).toString().substring(0, this.meleeModel.get(i3).toString().indexOf(" - "))).append(":").toString());

          i3++;
        }
        if (this.meleeModel.size() > 0) {
          localBufferedWriter.write(this.meleeModel.get(i3).toString().substring(0, this.meleeModel.get(i3).toString().indexOf(" - ")));
        }

        localBufferedWriter.newLine();
        int i4 = 0;
        while (i4 < this.meleeModel.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.meleeModel.get(i4).toString().substring(this.meleeModel.get(i4).toString().indexOf(" - ") + 3)).append(":").toString());

          i4++;
        }
        if (this.meleeModel.size() > 0) {
          localBufferedWriter.write(this.meleeModel.get(i4).toString().substring(this.meleeModel.get(i4).toString().indexOf(" - ") + 3));
        }

        localBufferedWriter.newLine();

        localBufferedWriter.write(new StringBuilder().append(this.chckbxMagic.isSelected() ? "true" : "false").append(":").append(this.magicCastSpell.getSelectedIndex()).toString());

        localBufferedWriter.newLine();
        int i5 = 0;
        while (i5 < this.magicModel.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.magicModel.get(i5).toString().substring(0, this.magicModel.get(i5).toString().indexOf(" - "))).append(":").toString());

          i5++;
        }
        if (this.magicModel.size() > 0) {
          localBufferedWriter.write(this.magicModel.get(i5).toString().substring(0, this.magicModel.get(i5).toString().indexOf(" - ")));
        }

        localBufferedWriter.newLine();
        int i6 = 0;
        while (i6 < this.magicModel.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.magicModel.get(i6).toString().substring(this.magicModel.get(i6).toString().indexOf(" - ") + 3)).append(":").toString());

          i6++;
        }
        if (this.magicModel.size() > 0) {
          localBufferedWriter.write(this.magicModel.get(i6).toString().substring(this.magicModel.get(i6).toString().indexOf(" - ") + 3));
        }

        localBufferedWriter.newLine();

        localBufferedWriter.write(new StringBuilder().append(this.chckbxRange.isSelected() ? "true" : "false").append(":").append(this.rangeAttackStyleBox.getSelectedIndex()).toString());

        localBufferedWriter.newLine();
        int i8 = 0;
        while (i8 < this.rangeModel.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.rangeModel.get(i8).toString().substring(0, this.rangeModel.get(i8).toString().indexOf(" - "))).append(":").toString());

          i8++;
        }
        if (this.rangeModel.size() > 0) {
          localBufferedWriter.write(this.rangeModel.get(i8).toString().substring(0, this.rangeModel.get(i8).toString().indexOf(" - ")));
        }

        localBufferedWriter.newLine();
        int i10 = 0;
        while (i10 < this.rangeModel.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.rangeModel.get(i10).toString().substring(this.rangeModel.get(i10).toString().indexOf(" - ") + 3)).append(":").toString());

          i10++;
        }
        if (this.rangeModel.size() > 0) {
          localBufferedWriter.write(this.rangeModel.get(i10).toString().substring(this.rangeModel.get(i10).toString().indexOf(" - ") + 3));
        }

        localBufferedWriter.newLine();

        localBufferedWriter.write(new StringBuilder().append(this.startCombatStyle.getSelectedIndex()).append(":").append(this.prayerTrigger.isSelected() ? "true" : "false").append(":").append(this.everyGameTrigger.isSelected() ? "true" : "false").append(":").append(this.randomGameTrigger.isSelected() ? "true" : "false").append(":").append(this.hitTrigger.isSelected() ? "true" : "false").append(":").append(this.hitTriggerBox1.getText()).append(":").append(this.hitTriggerBox2.getText()).append(":").append(this.meleeSafeSpotTrigger.isSelected() ? "true" : "false").append(":").append(this.chckbxFSGame.isSelected() ? "true" : "false").toString());

        localBufferedWriter.newLine();

        localBufferedWriter.write(this.chckbxMeleeDefence.isSelected() ? "true" : "false");

        localBufferedWriter.newLine();
        int i11 = 0;
        while (i11 < this.meleeModelDefence.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.meleeModelDefence.get(i11).toString().substring(0, this.meleeModelDefence.get(i11).toString().indexOf(" - "))).append(":").toString());

          i11++;
        }
        if (this.meleeModelDefence.size() > 0) {
          localBufferedWriter.write(this.meleeModelDefence.get(i11).toString().substring(0, this.meleeModelDefence.get(i11).toString().indexOf(" - ")));
        }

        localBufferedWriter.newLine();
        int i12 = 0;
        while (i12 < this.meleeModelDefence.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.meleeModelDefence.get(i12).toString().substring(this.meleeModelDefence.get(i12).toString().indexOf(" - ") + 3)).append(":").toString());

          i12++;
        }
        if (this.meleeModelDefence.size() > 0) {
          localBufferedWriter.write(this.meleeModelDefence.get(i12).toString().substring(this.meleeModelDefence.get(i12).toString().indexOf(" - ") + 3));
        }

        localBufferedWriter.newLine();

        localBufferedWriter.write(this.chckbxMagicDefence.isSelected() ? "true" : "false");

        localBufferedWriter.newLine();
        int i13 = 0;
        while (i13 < this.magicModelDefence.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.magicModelDefence.get(i13).toString().substring(0, this.magicModelDefence.get(i13).toString().indexOf(" - "))).append(":").toString());

          i13++;
        }
        if (this.magicModelDefence.size() > 0) {
          localBufferedWriter.write(this.magicModelDefence.get(i13).toString().substring(0, this.magicModelDefence.get(i13).toString().indexOf(" - ")));
        }

        localBufferedWriter.newLine();
        int i14 = 0;
        while (i14 < this.magicModelDefence.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.magicModelDefence.get(i14).toString().substring(this.magicModelDefence.get(i14).toString().indexOf(" - ") + 3)).append(":").toString());

          i14++;
        }
        if (this.magicModelDefence.size() > 0) {
          localBufferedWriter.write(this.magicModelDefence.get(i14).toString().substring(this.magicModelDefence.get(i14).toString().indexOf(" - ") + 3));
        }

        localBufferedWriter.newLine();

        localBufferedWriter.write(this.chckbxRangeDefence.isSelected() ? "true" : "false");

        localBufferedWriter.newLine();
        int i15 = 0;
        while (i15 < this.rangeModelDefence.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.rangeModelDefence.get(i15).toString().substring(0, this.rangeModelDefence.get(i15).toString().indexOf(" - "))).append(":").toString());

          i15++;
        }
        if (this.rangeModelDefence.size() > 0) {
          localBufferedWriter.write(this.rangeModelDefence.get(i15).toString().substring(0, this.rangeModelDefence.get(i15).toString().indexOf(" - ")));
        }

        localBufferedWriter.newLine();
        int i16 = 0;
        while (i16 < this.rangeModelDefence.size() - 1) {
          localBufferedWriter.write(new StringBuilder().append(this.rangeModelDefence.get(i16).toString().substring(this.rangeModelDefence.get(i16).toString().indexOf(" - ") + 3)).append(":").toString());

          i16++;
        }
        if (this.rangeModelDefence.size() > 0) {
          localBufferedWriter.write(this.rangeModelDefence.get(i16).toString().substring(this.rangeModelDefence.get(i16).toString().indexOf(" - ") + 3));
        }

        localBufferedWriter.close();

        this.statusLabel.setText("Saved");
        setStatusLabelBounds();
      }
      catch (Exception localException1) {
        this.statusLabel.setText("Error - See Log");
        setStatusLabelBounds();
        localException1.printStackTrace();
      }
    }
    String str1;
    if (paramActionEvent.getSource() == this.Load) {
      this.statusLabel.setText("Loading...");
      setStatusLabelBounds();
      try {
        BufferedReader localBufferedReader = new BufferedReader(new FileReader(this.this$0.settingsFile));

        String[] arrayOfString1 = new String[0];
        String[] arrayOfString2 = new String[0];

        String[] arrayOfString3 = new String[0];
        String[] arrayOfString4 = new String[0];
        int[] arrayOfInt1 = new int[0];
        String[] arrayOfString5 = new String[0];
        String[] arrayOfString6 = new String[0];
        String[] arrayOfString7 = new String[0];
        int[] arrayOfInt2 = new int[0];
        String[] arrayOfString8 = new String[0];
        String[] arrayOfString9 = new String[0];
        String[] arrayOfString10 = new String[0];
        int[] arrayOfInt3 = new int[0];
        String[] arrayOfString11 = new String[0];

        String[] arrayOfString12 = new String[0];

        String str4 = "";
        String[] arrayOfString13 = new String[0];
        int[] arrayOfInt4 = new int[0];
        String[] arrayOfString14 = new String[0];
        String str5 = "";
        String[] arrayOfString15 = new String[0];
        int[] arrayOfInt5 = new int[0];
        String[] arrayOfString16 = new String[0];
        String str6 = "";
        String[] arrayOfString17 = new String[0];
        int[] arrayOfInt6 = new int[0];
        String[] arrayOfString18 = new String[0];

        str1 = localBufferedReader.readLine();
        double d = Double.parseDouble(str1.substring(str1.indexOf(":") + 1));

        arrayOfString1 = localBufferedReader.readLine().split(":");
        arrayOfString2 = localBufferedReader.readLine().split(":");

        arrayOfString3 = localBufferedReader.readLine().split(":");
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString4 = str1.split(":");
          arrayOfInt1 = sTi(arrayOfString4);
        } else if (!str1.isEmpty()) {
          arrayOfString4 = new String[1];
          arrayOfString4[0] = str1;
          arrayOfInt1 = sTi(arrayOfString4);
        } else {
          arrayOfString4 = new String[1];
          arrayOfString4[0] = "";
        }
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString5 = str1.split(":");
        } else if (!str1.isEmpty()) {
          arrayOfString5 = new String[1];
          arrayOfString5[0] = str1;
        } else {
          arrayOfString5 = new String[1];
          arrayOfString5[0] = "";
        }

        arrayOfString6 = localBufferedReader.readLine().split(":");
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString7 = str1.split(":");
          arrayOfInt2 = sTi(arrayOfString7);
        } else if (!str1.isEmpty()) {
          arrayOfString7 = new String[1];
          arrayOfString7[0] = str1;
          arrayOfInt2 = sTi(arrayOfString7);
        } else {
          arrayOfString7 = new String[1];
          arrayOfString7[0] = "";
        }
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString8 = str1.split(":");
        } else if (!str1.isEmpty()) {
          arrayOfString8 = new String[1];
          arrayOfString8[0] = str1;
        } else {
          arrayOfString8 = new String[1];
          arrayOfString8[0] = "";
        }

        arrayOfString9 = localBufferedReader.readLine().split(":");
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString10 = str1.split(":");
          arrayOfInt3 = sTi(arrayOfString10);
        } else if (!str1.isEmpty()) {
          arrayOfString10 = new String[1];
          arrayOfString10[0] = str1;
          arrayOfInt3 = sTi(arrayOfString10);
        } else {
          arrayOfString10 = new String[1];
          arrayOfString10[0] = "";
        }
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString11 = str1.split(":");
        } else if (!str1.isEmpty()) {
          arrayOfString11 = new String[1];
          arrayOfString11[0] = str1;
        } else {
          arrayOfString11 = new String[1];
          arrayOfString11[0] = "";
        }

        arrayOfString12 = localBufferedReader.readLine().split(":");

        str4 = localBufferedReader.readLine();
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString13 = str1.split(":");
          arrayOfInt4 = sTi(arrayOfString13);
        } else if (!str1.isEmpty()) {
          arrayOfString13 = new String[1];
          arrayOfString13[0] = str1;
          arrayOfInt4 = sTi(arrayOfString13);
        } else {
          arrayOfString13 = new String[1];
          arrayOfString13[0] = "";
        }
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString14 = str1.split(":");
        } else if (!str1.isEmpty()) {
          arrayOfString14 = new String[1];
          arrayOfString14[0] = str1;
        } else {
          arrayOfString14 = new String[1];
          arrayOfString14[0] = "";
        }

        str5 = localBufferedReader.readLine();
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString15 = str1.split(":");
          arrayOfInt5 = sTi(arrayOfString15);
        } else if (!str1.isEmpty()) {
          arrayOfString15 = new String[1];
          arrayOfString15[0] = str1;
          arrayOfInt5 = sTi(arrayOfString15);
        } else {
          arrayOfString15 = new String[1];
          arrayOfString15[0] = "";
        }
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString16 = str1.split(":");
        } else if (!str1.isEmpty()) {
          arrayOfString16 = new String[1];
          arrayOfString16[0] = str1;
        } else {
          arrayOfString16 = new String[1];
          arrayOfString16[0] = "";
        }

        str6 = localBufferedReader.readLine();
        str1 = localBufferedReader.readLine();
        if (str1.contains(":")) {
          arrayOfString17 = str1.split(":");
          arrayOfInt6 = sTi(arrayOfString17);
        } else if (!str1.isEmpty()) {
          arrayOfString17 = new String[1];
          arrayOfString17[0] = str1;
          arrayOfInt6 = sTi(arrayOfString17);
        } else {
          arrayOfString17 = new String[1];
          arrayOfString17[0] = "";
        }
        str1 = localBufferedReader.readLine();
        if (str1 != null) {
          if (str1.contains(":")) {
            arrayOfString18 = str1.split(":");
          } else if (!str1.isEmpty()) {
            arrayOfString18 = new String[1];
            arrayOfString18[0] = str1;
          } else {
            arrayOfString18 = new String[1];
            arrayOfString18[0] = "";
          }
        } else {
          arrayOfString18 = new String[1];
          arrayOfString18[0] = "";
        }

        this.chckbxAntiBan.setSelected(Boolean.parseBoolean(arrayOfString1[0]));
        this.this$0.useAntiBan = this.chckbxAntiBan.isSelected();
        this.chckbxBandages.setSelected(Boolean.parseBoolean(arrayOfString1[1]));

        this.this$0.useBandages = this.chckbxBandages.isSelected();
        this.teleOrbBox.setSelectedIndex(Integer.parseInt(arrayOfString1[2]));
        this.this$0.teleorbLong = this.teleOrbBox.getSelectedItem().toString();
        this.chckbxBankTokens.setSelected(Boolean.parseBoolean(arrayOfString1[3]));

        this.this$0.bankTokens = this.chckbxBankTokens.isSelected();
        this.bankTokensNum.setText(arrayOfString1[4]);
        this.chckbxSearch.setSelected(Boolean.parseBoolean(arrayOfString1[5]));
        this.this$0.search = this.chckbxSearch.isSelected();
        this.chckbxScreenshots.setSelected(Boolean.parseBoolean(arrayOfString1[6]));

        this.this$0.screenshots = this.chckbxScreenshots.isSelected();
        this.mouseSpeedBox.setText(arrayOfString1[7]);
        this.chckbxDmode.setSelected(Boolean.parseBoolean(arrayOfString1[8]));
        this.this$0.dmode = this.chckbxDmode.isSelected();

        this.chckbxQuickPrayers.setSelected(Boolean.parseBoolean(arrayOfString2[0]));

        this.this$0.useQuickPrayers = this.chckbxQuickPrayers.isSelected();
        this.quickPrayersBox.setSelectedIndex(Integer.parseInt(arrayOfString2[1]));

        this.this$0.quickPrayersLong = this.quickPrayersBox.getSelectedItem().toString();

        this.chckbxPrayers.setSelected(Boolean.parseBoolean(arrayOfString2[2]));
        this.this$0.usePrayers = this.chckbxPrayers.isSelected();
        this.chckbxAttackPrayers.setSelected(Boolean.parseBoolean(arrayOfString2[3]));

        this.this$0.useAttackPrayers = this.chckbxAttackPrayers.isSelected();
        this.chckbxSkinPrayers.setSelected(Boolean.parseBoolean(arrayOfString2[4]));

        this.this$0.useSkinPrayers = this.chckbxSkinPrayers.isSelected();

        this.chckbxMelee.setSelected(Boolean.parseBoolean(arrayOfString3[0]));

        this.chckbxMagic.setSelected(Boolean.parseBoolean(arrayOfString6[0]));

        this.chckbxRange.setSelected(Boolean.parseBoolean(arrayOfString9[0]));

        this.chckbxMeleeDefence.setSelected(Boolean.parseBoolean(str4));

        this.chckbxMagicDefence.setSelected(Boolean.parseBoolean(str5));

        this.chckbxRangeDefence.setSelected(Boolean.parseBoolean(str6));

        this.meleeAttackStyleBox.setSelectedIndex(Integer.parseInt(arrayOfString3[1]));

        this.this$0.meleeAttackStyle = this.meleeAttackStyleBox.getSelectedItem().toString();

        this.magicCastSpell.setSelectedIndex(Integer.parseInt(arrayOfString6[1]));

        this.this$0.magicSpell = this.magicCastSpell.getSelectedItem().toString();
        this.rangeAttackStyleBox.setSelectedIndex(Integer.parseInt(arrayOfString9[1]));

        this.this$0.rangeAttackStyle = this.rangeAttackStyleBox.getSelectedItem().toString();

        int[] arrayOfInt7 = new int[39];
        String[] arrayOfString19 = new String[39];
        int i17 = 0;

        int i18 = 0;
        while (i18 < arrayOfInt1.length) {
          if (itemFound(arrayOfInt1[i18])) {
            i19 = invIndexOf(arrayOfInt1[i18]);
            this.invList.setSelectedIndex(i19);
            meleeAddMethod();
          }
          else if (!arrayContains(arrayOfInt1[i18], arrayOfInt7)) {
            arrayOfInt7[i17] = arrayOfInt1[i18];
            arrayOfString19[i17] = arrayOfString5[i18];
            i17++;
          }

          i18++;
        }

        int i19 = 0;
        while (i19 < arrayOfInt2.length) {
          if (itemFound(arrayOfInt2[i19])) {
            i20 = invIndexOf(arrayOfInt2[i19]);
            this.invList.setSelectedIndex(i20);
            magicAddMethod();
          }
          else if (!arrayContains(arrayOfInt2[i19], arrayOfInt7)) {
            arrayOfInt7[i17] = arrayOfInt2[i19];
            arrayOfString19[i17] = arrayOfString8[i19];
            i17++;
          }

          i19++;
        }

        int i20 = 0;
        while (i20 < arrayOfInt3.length) {
          if (itemFound(arrayOfInt3[i20])) {
            i21 = invIndexOf(arrayOfInt3[i20]);
            this.invList.setSelectedIndex(i21);
            rangeAddMethod();
          }
          else if (!arrayContains(arrayOfInt3[i20], arrayOfInt7)) {
            arrayOfInt7[i17] = arrayOfInt3[i20];
            arrayOfString19[i17] = arrayOfString11[i20];
            i17++;
          }

          i20++;
        }

        int i21 = 0;
        while (i21 < arrayOfInt4.length) {
          if (itemFound(arrayOfInt4[i21])) {
            i22 = invIndexOf(arrayOfInt4[i21]);
            this.invListDefence.setSelectedIndex(i22);
            meleeAddMethodDefence();
          }
          else if (!arrayContains(arrayOfInt4[i21], arrayOfInt7))
          {
            arrayOfInt7[i17] = arrayOfInt4[i21];
            arrayOfString19[i17] = arrayOfString14[i21];
            i17++;
          }

          i21++;
        }

        int i22 = 0;
        while (i22 < arrayOfInt5.length) {
          if (itemFound(arrayOfInt5[i22])) {
            i23 = invIndexOf(arrayOfInt5[i22]);
            this.invListDefence.setSelectedIndex(i23);
            magicAddMethodDefence();
          }
          else if (!arrayContains(arrayOfInt5[i22], arrayOfInt7))
          {
            arrayOfInt7[i17] = arrayOfInt5[i22];
            arrayOfString19[i17] = arrayOfString16[i22];
            i17++;
          }

          i22++;
        }

        int i23 = 0;
        while (i23 < arrayOfInt6.length) {
          if (itemFound(arrayOfInt6[i23])) {
            int i24 = invIndexOf(arrayOfInt6[i23]);
            this.invListDefence.setSelectedIndex(i24);
            rangeAddMethodDefence();
          }
          else if (!arrayContains(arrayOfInt6[i23], arrayOfInt7))
          {
            arrayOfInt7[i17] = arrayOfInt6[i23];
            arrayOfString19[i17] = arrayOfString18[i23];
            i17++;
          }

          i23++;
        }

        this.this$0.meleeActive = this.chckbxMelee.isSelected();
        if ((!this.this$0.meleeActive) && (!this.this$0.magicActive) && (!this.this$0.rangeActive)) {
          JOptionPane.showMessageDialog(null, "At least one Attack Style must be selected");

          this.chckbxMelee.setSelected(true);
          this.this$0.meleeActive = true;
        }
        else {
          this.meleeScrollPane.setEnabled(this.chckbxMelee.isSelected());
          this.meleeAdd.setEnabled(this.chckbxMelee.isSelected());
          this.meleeRemove.setEnabled(this.chckbxMelee.isSelected());
          this.meleeAttackStyleBox.setEnabled(this.chckbxMelee.isSelected());

          if (this.chckbxMelee.isSelected()) {
            this.this$0.startStylesP[0] = "Melee";
            this.meleePanel.setBackground(this.enabledColor);
          } else {
            this.this$0.startStylesP[0] = "NULL";
            this.meleePanel.setBackground(this.disabledColor);
          }
          refreshStartStyleMenu();
          this.CombatStylesTab.repaint(this.meleeArea);
        }

        this.this$0.magicActive = this.chckbxMagic.isSelected();
        if ((!this.this$0.meleeActive) && (!this.this$0.magicActive) && (!this.this$0.rangeActive)) {
          JOptionPane.showMessageDialog(null, "At least one Attack Style must be selected");

          this.chckbxMagic.setSelected(true);
          this.this$0.magicActive = true;
        } else {
          this.magicScrollPane.setEnabled(this.chckbxMagic.isSelected());
          this.magicAdd.setEnabled(this.chckbxMagic.isSelected());
          this.magicRemove.setEnabled(this.chckbxMagic.isSelected());
          this.magicCastSpell.setEnabled(this.chckbxMagic.isSelected());
          if (this.chckbxMagic.isSelected()) {
            this.this$0.startStylesP[1] = "Magic";
            this.magicPanel.setBackground(this.enabledColor);
          } else {
            this.this$0.startStylesP[1] = "NULL";
            this.magicPanel.setBackground(this.disabledColor);
          }
          refreshStartStyleMenu();
          this.CombatStylesTab.repaint(this.magicArea);
        }

        this.this$0.rangeActive = this.chckbxRange.isSelected();
        if ((!this.this$0.meleeActive) && (!this.this$0.magicActive) && (!this.this$0.rangeActive)) {
          JOptionPane.showMessageDialog(null, "At least one Attack Style must be selected");

          this.chckbxRange.setSelected(true);
          this.this$0.rangeActive = true;
        } else {
          this.rangeScrollPane.setEnabled(this.chckbxRange.isSelected());
          this.rangeAdd.setEnabled(this.chckbxRange.isSelected());
          this.rangeRemove.setEnabled(this.chckbxRange.isSelected());
          this.rangeAttackStyleBox.setEnabled(this.chckbxRange.isSelected());

          if (this.chckbxRange.isSelected()) {
            this.this$0.startStylesP[2] = "Range";
            this.rangePanel.setBackground(this.enabledColor);
          } else {
            this.this$0.startStylesP[2] = "NULL";
            this.rangePanel.setBackground(this.disabledColor);
          }
          refreshStartStyleMenu();
          this.CombatStylesTab.repaint(this.rangeArea);
        }

        this.this$0.meleeActiveDefence = this.chckbxMeleeDefence.isSelected();
        this.meleeScrollPaneDefence.setEnabled(this.chckbxMeleeDefence.isSelected());

        this.meleeAddDefence.setEnabled(this.chckbxMeleeDefence.isSelected());
        this.meleeRemoveDefence.setEnabled(this.chckbxMeleeDefence.isSelected());

        if (this.chckbxMeleeDefence.isSelected())
          this.meleePanelDefence.setBackground(this.enabledColor);
        else {
          this.meleePanelDefence.setBackground(this.disabledColor);
        }
        this.CombatStylesTabDefence.repaint(this.meleeAreaDefence);

        this.this$0.magicActiveDefence = this.chckbxMagicDefence.isSelected();
        this.magicScrollPaneDefence.setEnabled(this.chckbxMagicDefence.isSelected());

        this.magicAddDefence.setEnabled(this.chckbxMagicDefence.isSelected());
        this.magicRemoveDefence.setEnabled(this.chckbxMagicDefence.isSelected());

        if (this.chckbxMagicDefence.isSelected())
          this.magicPanelDefence.setBackground(this.enabledColor);
        else {
          this.magicPanelDefence.setBackground(this.disabledColor);
        }
        this.CombatStylesTabDefence.repaint(this.magicAreaDefence);

        this.this$0.rangeActiveDefence = this.chckbxRangeDefence.isSelected();
        this.rangeScrollPaneDefence.setEnabled(this.chckbxRangeDefence.isSelected());

        this.rangeAddDefence.setEnabled(this.chckbxRangeDefence.isSelected());
        this.rangeRemoveDefence.setEnabled(this.chckbxRangeDefence.isSelected());

        if (this.chckbxRangeDefence.isSelected())
          this.rangePanelDefence.setBackground(this.enabledColor);
        else {
          this.rangePanelDefence.setBackground(this.disabledColor);
        }
        this.CombatStylesTabDefence.repaint(this.rangeAreaDefence);

        this.startCombatStyle.setSelectedIndex(Integer.parseInt(arrayOfString12[0]));

        this.this$0.firstStyle = this.startCombatStyle.getSelectedItem().toString();
        this.prayerTrigger.setSelected(Boolean.parseBoolean(arrayOfString12[1]));

        this.this$0.prayerSwitch = this.prayerTrigger.isSelected();
        this.everyGameTrigger.setSelected(Boolean.parseBoolean(arrayOfString12[2]));

        this.this$0.everyGameSwitch = this.everyGameTrigger.isSelected();
        if (this.everyGameTrigger.isSelected()) {
          this.randomGameTrigger.setSelected(false);
          this.this$0.randomGameSwitch = false;
          this.hitTrigger.setSelected(false);
          this.this$0.hitSwitch = false;
        }
        this.randomGameTrigger.setSelected(Boolean.parseBoolean(arrayOfString12[3]));

        this.this$0.randomGameSwitch = this.randomGameTrigger.isSelected();
        if (this.randomGameTrigger.isSelected()) {
          this.everyGameTrigger.setSelected(false);
          this.this$0.everyGameSwitch = false;
          this.hitTrigger.setSelected(false);
          this.this$0.hitSwitch = false;
        }
        this.hitTrigger.setSelected(Boolean.parseBoolean(arrayOfString12[4]));

        this.this$0.hitSwitch = this.hitTrigger.isSelected();
        if (this.hitTrigger.isSelected()) {
          this.randomGameTrigger.setSelected(false);
          this.this$0.randomGameSwitch = false;
          this.everyGameTrigger.setSelected(false);
          this.this$0.everyGameSwitch = false;
        }
        this.hitTriggerBox1.setText(arrayOfString12[5]);
        this.hitTriggerBox2.setText(arrayOfString12[6]);

        if (d >= 1.0D)
        {
          if (arrayOfString12.length > 7) {
            this.meleeSafeSpotTrigger.setSelected(Boolean.parseBoolean(arrayOfString12[7]));

            this.this$0.meleeSafeSpotSwitch = this.meleeSafeSpotTrigger.isSelected();
          }

          if (arrayOfString12.length > 8) {
            this.chckbxFSGame.setSelected(Boolean.parseBoolean(arrayOfString12[8]));

            this.this$0.FSGame = this.chckbxFSGame.isSelected();
          }

        }

        localBufferedReader.close();

        if (i17 != 0) {
          String str7 = "";
          int i25 = 0;
          while (i25 < i17) {
            str7 = new StringBuilder().append(str7).append(Integer.toString(arrayOfInt7[i25])).append(" - ").append(arrayOfString19[i25]).append("\n").toString();

            i25++;
          }
          JOptionPane.showMessageDialog(null, new StringBuilder().append("These saved wield items were not found in your inventory,\n They will not be wielded:\n\n").append(str7).toString());
        }

        this.statusLabel.setText("Loaded");
        setStatusLabelBounds();
      }
      catch (FileNotFoundException localFileNotFoundException) {
        this.statusLabel.setText("No Settings File");
        setStatusLabelBounds();
      } catch (Exception localException2) {
        this.statusLabel.setText("Error - See Log");
        setStatusLabelBounds();
        localException2.printStackTrace();
      }
    }

    if (paramActionEvent.getSource() == this.Cancel) {
      this.this$0.dieScript = true;
      dispose();
    }

    if (paramActionEvent.getSource() == this.Start) {
      int i2 = 1;

      str1 = "";
      str1 = this.mouseSpeedBox.getText();
      try {
        this.this$0.mouseSpeed = Integer.parseInt(str1);
      } catch (NumberFormatException localNumberFormatException1) {
        JOptionPane.showMessageDialog(null, "Please enter a NUMBER in the mouse speed box");

        i2 = 0;
      }
      if ((this.this$0.mouseSpeed < 1) || (this.this$0.mouseSpeed > 25)) {
        JOptionPane.showMessageDialog(null, "Please enter a valid number in the mouse speed box");

        i2 = 0;
      }

      if (this.this$0.bankTokens) {
        this.this$0.tokensBeforeBankS = this.bankTokensNum.getText();
        try {
          this.this$0.tokensBeforeBank = Integer.parseInt(this.this$0.tokensBeforeBankS);
        } catch (NumberFormatException localNumberFormatException2) {
          JOptionPane.showMessageDialog(null, "Please enter a NUMBER in the 'Bank Tokens After' box");

          i2 = 0;
        }
        if (this.this$0.tokensBeforeBank < 1) {
          JOptionPane.showMessageDialog(null, "Please enter a number more than 0 in the 'Bank Tokens After' box");

          i2 = 0;
        }
      }

      if (this.this$0.hitSwitch) {
        String str2 = this.hitTriggerBox1.getText();
        String str3 = this.hitTriggerBox2.getText();
        int i7 = 0;
        int i9 = 0;
        try {
          i7 = Integer.parseInt(str2);

          i9 = Integer.parseInt(str3);

          if ((this.this$0.hitSwitchMinHits < 0) || (this.this$0.hitSwitchMaxHits < 0)) {
            JOptionPane.showMessageDialog(null, "Please enter positive numbers in the 'Change Attack Style on Opponent Hitsplats' boxes");

            i2 = 0;
          }
          if (i2 != 0)
            if (i9 >= i7) {
              this.this$0.hitSwitchMaxHits = i9;
              this.this$0.hitSwitchMinHits = i7;
            } else {
              this.this$0.hitSwitchMaxHits = i7;
              this.this$0.hitSwitchMinHits = i9;
            }
        }
        catch (NumberFormatException localNumberFormatException3) {
          JOptionPane.showMessageDialog(null, "Please enter NUMBERS in the 'Change Attack Style on Opponent Hitsplats' boxes");

          i2 = 0;
        }

      }

      if (i2 != 0)
      {
        if (this.this$0.meleeActive) {
          createMeleeItemsArray();
        }
        if (this.this$0.magicActive) {
          createMagicItemsArray();
        }
        if (this.this$0.rangeActive) {
          createRangeItemsArray();
        }

        if (this.this$0.meleeActiveDefence) {
          createMeleeItemsArrayDefence();
        }
        if (this.this$0.magicActiveDefence) {
          createMagicItemsArrayDefence();
        }
        if (this.this$0.rangeActiveDefence) {
          createRangeItemsArrayDefence();
        }

        if ((this.this$0.bankTokens) && 
          (this.this$0.dmode)) {
          this.this$0.log(new StringBuilder().append("Will bank tokens when over ").append(this.this$0.tokensBeforeBank).toString());
        }

        this.this$0.dieScript = false;
        dispose();
      }
    }
  }

  public boolean itemFound(int paramInt) {
    int i = 0;
    int j = 0;
    while (i < this.this$0.inventoryItemsIDs.length) {
      if (this.this$0.inventoryItemsIDs[i] == paramInt) {
        j = 1;
      }
      i++;
    }
    return j;
  }

  public boolean arrayContains(int paramInt, int[] paramArrayOfInt) {
    int i = 0;
    int j = 0;
    while (i < paramArrayOfInt.length) {
      if (paramArrayOfInt[i] == paramInt) {
        j = 1;
      }
      i++;
    }
    return j;
  }

  public void meleeAddMethod() {
    if ((this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[0]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[1]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[2]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[3]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[4]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[5]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[6]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[7]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[8]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[9]) && (this.invList.getSelectedIndex() != this.this$0.meleeListIDsAdded[10]))
    {
      if (this.this$0.meleeListIDsAdded[10] != -1) {
        JOptionPane.showMessageDialog(null, "You cannot wield more than 11 items...");
      }
      else {
        Object localObject = Integer.toString(this.this$0.inventoryItemsIDs[this.invList.getSelectedIndex()]);

        int i = 5 - ((String)localObject).length();
        String str = "";
        int j = 0;
        while (j < i) {
          str = new StringBuilder().append(str).append("0").toString();
          j++;
        }
        str = new StringBuilder().append(str).append((String)localObject).toString();
        localObject = str;
        this.meleeModel.add(this.meleeModel.size(), new StringBuilder().append((String)localObject).append(" - ").append(this.this$0.inventoryItemsNames[this.invList.getSelectedIndex()]).toString());

        this.this$0.meleeListIDsAdded[(this.meleeModel.size() - 1)] = this.invList.getSelectedIndex();
      }
    }
  }

  public void magicAddMethod() {
    if ((this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[0]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[1]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[2]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[3]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[4]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[5]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[6]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[7]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[8]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[9]) && (this.invList.getSelectedIndex() != this.this$0.magicListIDsAdded[10]))
    {
      if (this.this$0.magicListIDsAdded[10] != -1) {
        JOptionPane.showMessageDialog(null, "You cannot wield more than 11 items...");
      }
      else {
        Object localObject = Integer.toString(this.this$0.inventoryItemsIDs[this.invList.getSelectedIndex()]);

        int i = 5 - ((String)localObject).length();
        String str = "";
        int j = 0;
        while (j < i) {
          str = new StringBuilder().append(str).append("0").toString();
          j++;
        }
        str = new StringBuilder().append(str).append((String)localObject).toString();
        localObject = str;
        this.magicModel.add(this.magicModel.size(), new StringBuilder().append((String)localObject).append(" - ").append(this.this$0.inventoryItemsNames[this.invList.getSelectedIndex()]).toString());

        this.this$0.magicListIDsAdded[(this.magicModel.size() - 1)] = this.invList.getSelectedIndex();
      }
    }
  }

  public void rangeAddMethod() {
    if ((this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[0]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[1]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[2]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[3]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[4]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[5]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[6]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[7]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[8]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[9]) && (this.invList.getSelectedIndex() != this.this$0.rangeListIDsAdded[10]))
    {
      if (this.this$0.rangeListIDsAdded[10] != -1) {
        JOptionPane.showMessageDialog(null, "You cannot wield more than 11 items...");
      }
      else {
        Object localObject = Integer.toString(this.this$0.inventoryItemsIDs[this.invList.getSelectedIndex()]);

        int i = 5 - ((String)localObject).length();
        String str = "";
        int j = 0;
        while (j < i) {
          str = new StringBuilder().append(str).append("0").toString();
          j++;
        }
        str = new StringBuilder().append(str).append((String)localObject).toString();
        localObject = str;
        this.rangeModel.add(this.rangeModel.size(), new StringBuilder().append((String)localObject).append(" - ").append(this.this$0.inventoryItemsNames[this.invList.getSelectedIndex()]).toString());

        this.this$0.rangeListIDsAdded[(this.rangeModel.size() - 1)] = this.invList.getSelectedIndex();
      }
    }
  }

  public void meleeAddMethodDefence() {
    if ((this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[0]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[1]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[2]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[3]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[4]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[5]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[6]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[7]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[8]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[9]) && (this.invListDefence.getSelectedIndex() != this.this$0.meleeListIDsAddedDefence[10]))
    {
      if (this.this$0.meleeListIDsAddedDefence[10] != -1) {
        JOptionPane.showMessageDialog(null, "You cannot wield more than 11 items...");
      }
      else {
        Object localObject = Integer.toString(this.this$0.inventoryItemsIDs[this.invListDefence.getSelectedIndex()]);

        int i = 5 - ((String)localObject).length();
        String str = "";
        int j = 0;
        while (j < i) {
          str = new StringBuilder().append(str).append("0").toString();
          j++;
        }
        str = new StringBuilder().append(str).append((String)localObject).toString();
        localObject = str;
        this.meleeModelDefence.add(this.meleeModelDefence.size(), new StringBuilder().append((String)localObject).append(" - ").append(this.this$0.inventoryItemsNames[this.invListDefence.getSelectedIndex()]).toString());

        this.this$0.meleeListIDsAddedDefence[(this.meleeModelDefence.size() - 1)] = this.invListDefence.getSelectedIndex();
      }
    }
  }

  public void magicAddMethodDefence() {
    if ((this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[0]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[1]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[2]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[3]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[4]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[5]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[6]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[7]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[8]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[9]) && (this.invListDefence.getSelectedIndex() != this.this$0.magicListIDsAddedDefence[10]))
    {
      if (this.this$0.magicListIDsAddedDefence[10] != -1) {
        JOptionPane.showMessageDialog(null, "You cannot wield more than 11 items...");
      }
      else {
        Object localObject = Integer.toString(this.this$0.inventoryItemsIDs[this.invListDefence.getSelectedIndex()]);

        int i = 5 - ((String)localObject).length();
        String str = "";
        int j = 0;
        while (j < i) {
          str = new StringBuilder().append(str).append("0").toString();
          j++;
        }
        str = new StringBuilder().append(str).append((String)localObject).toString();
        localObject = str;
        this.magicModelDefence.add(this.magicModelDefence.size(), new StringBuilder().append((String)localObject).append(" - ").append(this.this$0.inventoryItemsNames[this.invListDefence.getSelectedIndex()]).toString());

        this.this$0.magicListIDsAddedDefence[(this.magicModelDefence.size() - 1)] = this.invListDefence.getSelectedIndex();
      }
    }
  }

  public void rangeAddMethodDefence() {
    if ((this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[0]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[1]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[2]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[3]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[4]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[5]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[6]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[7]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[8]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[9]) && (this.invListDefence.getSelectedIndex() != this.this$0.rangeListIDsAddedDefence[10]))
    {
      if (this.this$0.rangeListIDsAdded[10] != -1) {
        JOptionPane.showMessageDialog(null, "You cannot wield more than 11 items...");
      }
      else {
        Object localObject = Integer.toString(this.this$0.inventoryItemsIDs[this.invListDefence.getSelectedIndex()]);

        int i = 5 - ((String)localObject).length();
        String str = "";
        int j = 0;
        while (j < i) {
          str = new StringBuilder().append(str).append("0").toString();
          j++;
        }
        str = new StringBuilder().append(str).append((String)localObject).toString();
        localObject = str;
        this.rangeModelDefence.add(this.rangeModelDefence.size(), new StringBuilder().append((String)localObject).append(" - ").append(this.this$0.inventoryItemsNames[this.invListDefence.getSelectedIndex()]).toString());

        this.this$0.rangeListIDsAddedDefence[(this.rangeModelDefence.size() - 1)] = this.invListDefence.getSelectedIndex();
      }
    }
  }

  public int invIndexOf(int paramInt) {
    int i = 0;
    int j = 0;
    while ((i < this.this$0.inventoryItemsIDs.length) && (j == 0)) {
      if (this.this$0.inventoryItemsIDs[i] == paramInt) {
        j = 1; continue;
      }
      i++;
    }

    return i;
  }

  public int[] sTi(String[] paramArrayOfString) throws Exception
  {
    if (paramArrayOfString != null) {
      int[] arrayOfInt = new int[paramArrayOfString.length];
      for (int i = 0; i < paramArrayOfString.length; i++) {
        arrayOfInt[i] = Integer.parseInt(paramArrayOfString[i]);
      }
      return arrayOfInt;
    }
    return null;
  }

  public void valueChanged(ListSelectionEvent paramListSelectionEvent)
  {
    if (paramListSelectionEvent.getSource() == this.invList) {
      this.this$0.inventoryListSelectedID = this.invList.getSelectedIndex();
    }

    if (paramListSelectionEvent.getSource() == this.invListDefence)
      this.this$0.inventoryListSelectedIDDefence = this.invListDefence.getSelectedIndex();
  }

  public void createMeleeItemsArray()
  {
    int i = this.meleeModel.size();
    this.this$0.meleeEquipment = new int[i];
    int j = 0;
    while (j < i) {
      this.this$0.meleeEquipment[j] = this.this$0.inventoryItemsIDs[this.this$0.meleeListIDsAdded[j]];
      j++;
    }
  }

  public void createMagicItemsArray() {
    int i = this.magicModel.size();
    this.this$0.magicEquipment = new int[i];
    int j = 0;
    while (j < i) {
      this.this$0.magicEquipment[j] = this.this$0.inventoryItemsIDs[this.this$0.magicListIDsAdded[j]];
      j++;
    }
  }

  public void createRangeItemsArray() {
    int i = this.rangeModel.size();
    this.this$0.rangeEquipment = new int[i];
    int j = 0;
    while (j < i) {
      this.this$0.rangeEquipment[j] = this.this$0.inventoryItemsIDs[this.this$0.rangeListIDsAdded[j]];
      j++;
    }
  }

  public void refreshStartStyleMenu()
  {
    this.this$0.startStyles1[0] = "NULL";
    this.this$0.startStyles2[0] = "NULL";
    this.this$0.startStyles2[1] = "NULL";
    this.this$0.startStyles3[0] = "NULL";
    this.this$0.startStyles3[1] = "NULL";
    this.this$0.startStyles3[2] = "NULL";

    int i = 0;
    int j = 0;
    while (j < 3) {
      if (!this.this$0.startStylesP[j].equals("NULL")) {
        i++;
      }
      j++;
    }
    if (this.this$0.dmode)
      this.this$0.log(new StringBuilder().append("Styles Enabled for Attack: ").append(i).toString());
    int k;
    switch (i) {
    case 1:
      k = 0;
      while (this.this$0.startStyles1[0].equals("NULL")) {
        this.this$0.startStyles1[0] = this.this$0.startStylesP[k];
        k++;
      }
      this.startCombatStyle.setModel(new DefaultComboBoxModel(this.this$0.startStyles1));

      this.this$0.firstStyle = this.this$0.startStyles1[0];
      break;
    case 2:
      k = 0;
      while (this.this$0.startStyles2[0].equals("NULL")) {
        this.this$0.startStyles2[0] = this.this$0.startStylesP[k];
        k++;
      }
      while (this.this$0.startStyles2[1].equals("NULL")) {
        this.this$0.startStyles2[1] = this.this$0.startStylesP[k];
        k++;
      }
      this.startCombatStyle.setModel(new DefaultComboBoxModel(this.this$0.startStyles2));

      this.this$0.firstStyle = this.this$0.startStyles2[0];
      break;
    case 3:
      this.this$0.startStyles3[0] = this.this$0.startStylesP[0];
      this.this$0.startStyles3[1] = this.this$0.startStylesP[1];
      this.this$0.startStyles3[2] = this.this$0.startStylesP[2];
      this.startCombatStyle.setModel(new DefaultComboBoxModel(this.this$0.startStyles3));

      this.this$0.firstStyle = this.this$0.startStyles3[0];
    }
  }

  public void createMeleeItemsArrayDefence()
  {
    int i = this.meleeModelDefence.size();
    this.this$0.meleeEquipmentDefence = new int[i];
    int j = 0;
    while (j < i) {
      this.this$0.meleeEquipmentDefence[j] = this.this$0.inventoryItemsIDs[this.this$0.meleeListIDsAddedDefence[j]];
      j++;
    }
  }

  public void createMagicItemsArrayDefence() {
    int i = this.magicModelDefence.size();
    this.this$0.magicEquipmentDefence = new int[i];
    int j = 0;
    while (j < i) {
      this.this$0.magicEquipmentDefence[j] = this.this$0.inventoryItemsIDs[this.this$0.magicListIDsAddedDefence[j]];
      j++;
    }
  }

  public void createRangeItemsArrayDefence() {
    int i = this.rangeModelDefence.size();
    this.this$0.rangeEquipmentDefence = new int[i];
    int j = 0;
    while (j < i) {
      this.this$0.rangeEquipmentDefence[j] = this.this$0.inventoryItemsIDs[this.this$0.rangeListIDsAddedDefence[j]];
      j++;
    }
  }
}